Record Class SegmentRange
java.lang.Object
java.lang.Record
io.fluxzero.common.api.tracking.SegmentRange
Represents an index value for a contiguous range of segments.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSegmentRange(int segmentStart, int segmentEnd, long index) Creates an instance of aSegmentRangerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static SegmentRangefullSegment(long lastIndex) final inthashCode()Returns a hash code value for this object.longindex()Returns the value of theindexrecord component.intReturns the value of thesegmentEndrecord component.intReturns the value of thesegmentStartrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
MAX_SEGMENT
public static final int MAX_SEGMENT- See Also:
-
-
Constructor Details
-
SegmentRange
public SegmentRange(int segmentStart, int segmentEnd, long index) Creates an instance of aSegmentRangerecord class.- Parameters:
segmentStart- the value for thesegmentStartrecord componentsegmentEnd- the value for thesegmentEndrecord componentindex- the value for theindexrecord component
-
-
Method Details
-
fullSegment
-
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 with thecomparemethod from their corresponding wrapper classes. -
segmentStart
public int segmentStart()Returns the value of thesegmentStartrecord component.- Returns:
- the value of the
segmentStartrecord component
-
segmentEnd
public int segmentEnd()Returns the value of thesegmentEndrecord component.- Returns:
- the value of the
segmentEndrecord component
-
index
public long index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-