Package 

Class Ulid

    • Field Summary

      Fields 
      Modifier and Type Field Description
      public static int ULID_BYTES
    • Method Summary

      Modifier and Type Method Description
      static Ulid from(Array<byte> buffer) Create a new Ulid object from a buffer
      static Ulid from(String ulidString) Create a new Ulid object from a string
      static Ulid randomUlid() Create a new Ulid with the current timestamp and random bytes
      Array<byte> toBytes() Get this Ulid as a byte array
      String toULIDString() Get the ULID String representation
      boolean equals(Object o)
      int hashCode()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • from

         static Ulid from(Array<byte> buffer)

        Create a new Ulid object from a buffer

        Parameters:
        buffer - The Ulid buffer, must be 16 bytes
      • from

         static Ulid from(String ulidString)

        Create a new Ulid object from a string

        Parameters:
        ulidString - The encoded Base32 string representation
      • randomUlid

         static Ulid randomUlid()

        Create a new Ulid with the current timestamp and random bytes

      • toBytes

         Array<byte> toBytes()

        Get this Ulid as a byte array