java.lang.Object
java.lang.Record
com.agentforge4j.llm.api.PromptLayerBoundaries
public record PromptLayerBoundaries(Integer layer1EndOffset, Integer layer2EndOffset, Integer layer3EndOffset)
extends Record
Byte offsets marking the end of each prompt layer in an assembled provider request body.
Layers are ordered most-stable-first: layer 1 is the most stable prefix, layer 2 follows layer 1,
and layer 3 follows layer 2. Each component is the cumulative byte offset at the
end of that layer in the assembled prompt (exclusive end index in the UTF-8
byte
sequence). A null component means that layer is not present in the assembled prompt.
-
Constructor Summary
ConstructorsConstructorDescriptionPromptLayerBoundaries(Integer layer1EndOffset, Integer layer2EndOffset, Integer layer3EndOffset) Creates an instance of aPromptLayerBoundariesrecord 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.Returns the value of thelayer1EndOffsetrecord component.Returns the value of thelayer2EndOffsetrecord component.Returns the value of thelayer3EndOffsetrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PromptLayerBoundaries
public PromptLayerBoundaries(Integer layer1EndOffset, Integer layer2EndOffset, Integer layer3EndOffset) Creates an instance of aPromptLayerBoundariesrecord class.- Parameters:
layer1EndOffset- the value for thelayer1EndOffsetrecord componentlayer2EndOffset- the value for thelayer2EndOffsetrecord componentlayer3EndOffset- the value for thelayer3EndOffsetrecord 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). -
layer1EndOffset
Returns the value of thelayer1EndOffsetrecord component.- Returns:
- the value of the
layer1EndOffsetrecord component
-
layer2EndOffset
Returns the value of thelayer2EndOffsetrecord component.- Returns:
- the value of the
layer2EndOffsetrecord component
-
layer3EndOffset
Returns the value of thelayer3EndOffsetrecord component.- Returns:
- the value of the
layer3EndOffsetrecord component
-