Package sk.iway.iwcm.rag.indexing
Record Class SlidingWindowChunker.Chunk
java.lang.Object
java.lang.Record
sk.iway.iwcm.rag.indexing.SlidingWindowChunker.Chunk
- Record Components:
startOffset- source offset at the selected boundary, before trimming the passagetext- passage text
- Enclosing class:
- SlidingWindowChunker
Stores a passage and its start offset in the normalized, trimmed source text.
-
Constructor Summary
Constructors -
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.intReturns the value of thestartOffsetrecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Chunk
Creates an instance of aChunkrecord class.- Parameters:
startOffset- the value for thestartOffsetrecord componenttext- the value for thetextrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
startOffset
public int startOffset()Returns the value of thestartOffsetrecord component.- Returns:
- the value of the
startOffsetrecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-