Record Class TimeSegment<T>
java.lang.Object
java.lang.Record
com.djrapitops.plan.delivery.domain.TimeSegment<T>
-
Constructor Summary
ConstructorsConstructorDescriptionTimeSegment(long start, long end, T value) Creates an instance of aTimeSegmentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic <V> Comparator<TimeSegment<V>> static <V> Comparator<TimeSegment<V>> longend()Returns the value of theendrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longstart()Returns the value of thestartrecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
TimeSegment
Creates an instance of aTimeSegmentrecord class.- Parameters:
start- the value for thestartrecord componentend- the value for theendrecord componentvalue- the value for thevaluerecord component
-
-
Method Details
-
earliestStartFirstComparator
-
earliestEndFirstComparator
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
start
public long start()Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
end
public long end()Returns the value of theendrecord component.- Returns:
- the value of the
endrecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-