Record Class UuidVersion7Strategy.State
java.lang.Object
java.lang.Record
org.hibernate.id.uuid.UuidVersion7Strategy.State
- Enclosing class:
UuidVersion7Strategy
-
Constructor Summary
Constructors -
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.longReturns the value of thelastSequencerecord component.Returns the value of thelastTimestamprecord component.longmillis()longnanos()Returns the value of thenanosrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
State
Creates an instance of aStaterecord class.- Parameters:
lastTimestamp- the value for thelastTimestamprecord componentlastSequence- the value for thelastSequencerecord componentnanos- the value for thenanosrecord component
-
-
Method Details
-
millis
public long millis() -
getNextState
-
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. -
lastTimestamp
Returns the value of thelastTimestamprecord component.- Returns:
- the value of the
lastTimestamprecord component
-
lastSequence
public long lastSequence()Returns the value of thelastSequencerecord component.- Returns:
- the value of the
lastSequencerecord component
-
nanos
public long nanos()Returns the value of thenanosrecord component.- Returns:
- the value of the
nanosrecord component
-