Package de.huxhorn.sulky.ulid
Class ULID.Value
- java.lang.Object
-
- de.huxhorn.sulky.ulid.ULID.Value
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ULID.Value>
- Enclosing class:
- ULID
public static class ULID.Value extends java.lang.Object implements java.lang.Comparable<ULID.Value>, java.io.Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Value(long mostSignificantBits, long leastSignificantBits)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(ULID.Value val)booleanequals(java.lang.Object o)longgetLeastSignificantBits()Returns the least significant 64 bits of this ULID's 128 bit value.longgetMostSignificantBits()Returns the most significant 64 bits of this ULID's 128 bit value.inthashCode()ULID.Valueincrement()longtimestamp()byte[]toBytes()java.lang.StringtoString()
-
-
-
Method Detail
-
getMostSignificantBits
public long getMostSignificantBits()
Returns the most significant 64 bits of this ULID's 128 bit value.- Returns:
- The most significant 64 bits of this ULID's 128 bit value
-
getLeastSignificantBits
public long getLeastSignificantBits()
Returns the least significant 64 bits of this ULID's 128 bit value.- Returns:
- The least significant 64 bits of this ULID's 128 bit value
-
timestamp
public long timestamp()
-
toBytes
public byte[] toBytes()
-
increment
public ULID.Value increment()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
compareTo
public int compareTo(ULID.Value val)
- Specified by:
compareToin interfacejava.lang.Comparable<ULID.Value>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-