Record Class CJ1TimeRange
java.lang.Object
java.lang.Record
com.io7m.cardant.protocol.inventory.json.internal.CJ1TimeRange
- All Implemented Interfaces:
CJ1ValueType
@JsonClassDescription("A range of time.")
public record CJ1TimeRange(OffsetDateTime lower, OffsetDateTime upper)
extends Record
implements CJ1ValueType
-
Constructor Summary
ConstructorsConstructorDescriptionCJ1TimeRange(OffsetDateTime lower, OffsetDateTime upper) Creates an instance of aCJ1TimeRangerecord 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.lower()Returns the value of thelowerrecord component.final StringtoString()Returns a string representation of this record class.upper()Returns the value of theupperrecord component.
-
Constructor Details
-
CJ1TimeRange
public CJ1TimeRange(@JsonPropertyDescription("The inclusive lower bound.") OffsetDateTime lower, @JsonPropertyDescription("The inclusive upper bound.") OffsetDateTime upper) Creates an instance of aCJ1TimeRangerecord class.- Parameters:
lower- the value for thelowerrecord componentupper- the value for theupperrecord component
-
-
Method Details
-
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 withObjects::equals(Object,Object). -
lower
Returns the value of thelowerrecord component.- Returns:
- the value of the
lowerrecord component
-
upper
Returns the value of theupperrecord component.- Returns:
- the value of the
upperrecord component
-