Package org.hibernate.id.uuid
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
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
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
-