Package com.darkcollective.relix.value
Record Class TimestampValue
java.lang.Object
java.lang.Record
com.darkcollective.relix.value.TimestampValue
- Record Components:
value- the instant; must not benull
- All Implemented Interfaces:
Value
A runtime timestamp value — an absolute point on the timeline, UTC-normalised,
backed by
Instant (e.g. 2026-06-15T13:40:00Z).-
Constructor Summary
ConstructorsConstructorDescriptionTimestampValue(Instant value) Creates an instance of aTimestampValuerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the canonical ISO-8601 instant string with a trailingZ, 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
-
TimestampValue
Creates an instance of aTimestampValuerecord 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 instant string with a trailingZ, e.g."2026-06-15T13:40:00Z".- Specified by:
asDisplayStringin interfaceValue- Returns:
- ISO-8601 UTC-instant 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
-