Package com.io7m.idstore.model
Record Class IdTimeRange
java.lang.Object
java.lang.Record
com.io7m.idstore.model.IdTimeRange
- Record Components:
timeLower
- The lower timetimeUpper
- The upper time
An inclusive range of time.
-
Constructor Summary
ConstructorDescriptionIdTimeRange
(OffsetDateTime timeLower, OffsetDateTime timeUpper) An inclusive range of time. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.static IdTimeRange
largest()
Returns the value of thetimeLower
record component.Returns the value of thetimeUpper
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
IdTimeRange
An inclusive range of time.- Parameters:
timeLower
- The lower timetimeUpper
- The upper time
-
-
Method Details
-
largest
- Returns:
- The largest sensible time range
-
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)
. -
timeLower
Returns the value of thetimeLower
record component.- Returns:
- the value of the
timeLower
record component
-
timeUpper
Returns the value of thetimeUpper
record component.- Returns:
- the value of the
timeUpper
record component
-