Record Class FigureSection
java.lang.Object
java.lang.Record
ai.doctruth.FigureSection
- Record Components:
caption- the figure's caption text, possibly empty.location- the source-document span this figure was recovered from.
- All Implemented Interfaces:
ParsedSection
public record FigureSection(String caption, SourceLocation location)
extends Record
implements ParsedSection
A figure (image, chart, diagram) recovered from the source document, represented by its
caption text plus a
SourceLocation. The image bytes themselves are not carried by
this record — downstream consumers can re-fetch from the source PDF/DOCX using the location.
Invariants: caption and location are non-null. Empty caption is
allowed (some figures have no caption).
- Since:
- 0.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionFigureSection(String caption, SourceLocation location) Creates an instance of aFigureSectionrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncaption()Returns the value of thecaptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.location()Returns the value of thelocationrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
caption
-
location
-