Class UlidCreator


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

      • 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
      • getFastUlid

        public static UUID getFastUlid()
        Returns a ULID as GUID. The random component is generated by a fast random number generator: Xorshift128PlusRandom.
        Returns:
        a UUID
      • getFastUlidString

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