Class 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 Detail

      • Value

        public Value​(long mostSignificantBits,
                     long leastSignificantBits)
    • 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()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • compareTo

        public int compareTo​(ULID.Value val)
        Specified by:
        compareTo in interface java.lang.Comparable<ULID.Value>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object