Record Class TableSection
java.lang.Object
java.lang.Record
ai.doctruth.TableSection
- Record Components:
rows- the table cells, row-major.location- the source-document span this table was recovered from.
- All Implemented Interfaces:
ParsedSection
public record TableSection(List<List<String>> rows, SourceLocation location)
extends Record
implements ParsedSection
A flat string-cell table recovered from the source document, anchored to a
SourceLocation. Each row is a list of cell strings; rows need not be the same length
(rendering is downstream).
Invariants: rows and location are non-null. Each inner row is non-null.
Empty rows is allowed (a table with zero rows is still a parsed section).
The rows field is defensively copied on construction (both outer and inner lists)
and exposed as an unmodifiable nested view, so neither the caller's input nor the accessor's
return value can mutate the section's state.
- Since:
- 0.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionTableSection(List<List<String>> rows, SourceLocation location) Creates an instance of aTableSectionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal 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.rows()Returns the value of therowsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TableSection
-
-
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). -
rows
-
location
-