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 boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
Returns the value of thelastSequence
record component.Returns the value of thelastTimestamp
record component.long
millis()
long
nanos()
final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
State
Creates an instance of aState
record class.- Parameters:
lastTimestamp
- the value for thelastTimestamp
record componentlastSequence
- the value for thelastSequence
record component
-
-
Method Details
-
millis
public long millis() -
nanos
public long nanos() -
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 thelastTimestamp
record component.- Returns:
- the value of the
lastTimestamp
record component
-
lastSequence
public int lastSequence()Returns the value of thelastSequence
record component.- Returns:
- the value of the
lastSequence
record component
-