java.lang.Object
java.lang.Record
com.darkcollective.relix.value.TimeValue
- Record Components:
value- the time of day; must not benull
- All Implemented Interfaces:
Value
A runtime wall-clock time-of-day value with no time zone, backed by
LocalTime (e.g. 13:40:00).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the canonical ISO-8601 time string, e.g.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisNull()Returnstrueif this value is null (absent).final StringtoString()Returns a string representation of this record class.type()Returns theScalarTypethat describes this value's kind.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
TimeValue
Creates an instance of aTimeValuerecord class.- Parameters:
value- the value for thevaluerecord component
-
-
Method Details
-
isNull
public boolean isNull()Description copied from interface:ValueReturnstrueif this value is null (absent). -
type
Description copied from interface:Value -
asDisplayString
Returns the canonical ISO-8601 time string, e.g."13:40"or"13:40:00.5"(trailing zero fields are elided byLocalTime.toString()).- Specified by:
asDisplayStringin interfaceValue- Returns:
- ISO-8601 local-time string
-
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). -
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-