Package io.datarouter.types
Record Class Ulid
java.lang.Object
java.lang.Record
io.datarouter.types.Ulid
- All Implemented Interfaces:
Comparable<Ulid>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintstatic UlidcreateFirstUlidFromTimestamp(long timestamp) static UlidcreateUlidFromTimestamp(long timestamp, long seed) final booleanIndicates whether some other object is "equal to" this one.longfinal inthashCode()Returns a hash code value for this object.static StringnewValue()toString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Field Details
-
LENGTH
public static final int LENGTH- See Also:
-
-
Constructor Details
-
Ulid
Creates an instance of aUlidrecord class.- Parameters:
value- the value for thevaluerecord component
-
Ulid
public Ulid()
-
-
Method Details
-
newValue
-
getTimestampMs
public long getTimestampMs() -
getInstant
-
createFirstUlidFromTimestamp
-
createUlidFromTimestamp
-
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. -
compareTo
- Specified by:
compareToin interfaceComparable<Ulid>
-
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
-