Module org.elasticsearch.server
Package org.elasticsearch.inference
Record Class ChunkedInference.Chunk
java.lang.Object
java.lang.Record
org.elasticsearch.inference.ChunkedInference.Chunk
- Record Components:
textOffset-bytesReference-
- Enclosing interface:
ChunkedInference
public static record ChunkedInference.Chunk(ChunkedInference.TextOffset textOffset, BytesReference bytesReference)
extends Record
A chunk of inference results containing the substring location in the original text and the bytes reference.
-
Constructor Summary
ConstructorsConstructorDescriptionChunk(ChunkedInference.TextOffset textOffset, BytesReference bytesReference) Creates an instance of aChunkrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebytesReferencerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thetextOffsetrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Chunk
Creates an instance of aChunkrecord class.- Parameters:
textOffset- the value for thetextOffsetrecord componentbytesReference- the value for thebytesReferencerecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
textOffset
Returns the value of thetextOffsetrecord component.- Returns:
- the value of the
textOffsetrecord component
-
bytesReference
Returns the value of thebytesReferencerecord component.- Returns:
- the value of the
bytesReferencerecord component
-