Class UlidConverter


  • public final class UlidConverter
    extends Object
    • Method Detail

      • toString

        public static String toString​(UUID ulid)
        Convert a UUID to ULID string The returning string is encoded to Crockford's base32.
        Parameters:
        ulid - a UUID
        Returns:
        a ULID
      • fromString

        public static UUID fromString​(String ulid)
        Converts a ULID string to a UUID. The input string must be encoded to Crockford's base32, following the ULID specification. An exception is thrown if the ULID string is invalid.
        Parameters:
        ulid - a ULID
        Returns:
        a UUID if valid
        Throws:
        InvalidUlidException - if invalid