Class UlidCreator


  • public final class UlidCreator
    extends Object
    A factory for Universally Unique Lexicographically Sortable Identifiers. See the ULID spec: https://github.com/ulid/spec
    • Method Detail

      • fromString

        public static UUID fromString​(String ulid)
        Returns a ULID as GUID from a string.
        Parameters:
        ulid - a ULID string
        Returns:
        a UUID
      • getUlid

        public static UUID getUlid()
        Returns a ULID as GUID. The random component is generated by a secure random number generator: SecureRandom.
        Returns:
        a UUID
      • getUlidString

        public static String getUlidString()
        Returns a ULID string. The returning string is encoded to Crockford's base32. The random component is generated by a secure random number generator: SecureRandom.
        Returns:
        a ULID