Package com.grzm

Class NamedUUID


  • public class NamedUUID
    extends Object
    Helpers to generate Version 3 and Version 5 UUID values for UUID
    • Field Detail

      • NIL

        public static final UUID NIL
        The nil UUID, 00000000-0000-0000-0000-000000000000
      • NS_DNS

        public static final UUID NS_DNS
        Namespace UUID for fully-qualified domain names
      • NS_URL

        public static final UUID NS_URL
        Namespace UUID for URLs
      • NS_OID

        public static final UUID NS_OID
        Namespace UUID for ITU object identifiers
      • NS_X500

        public static final UUID NS_X500
        Namespace UUID for X.500 distinguished names
    • Constructor Detail

      • NamedUUID

        public NamedUUID()
    • Method Detail

      • v3

        public static UUID v3​(UUID namespace,
                              String name)
                       throws NullPointerException
        Return the a Version 3 UUID for the given namespace UUID and name
        Parameters:
        namespace - UUID value for the namespace
        name - Namespaced value
        Returns:
        Version 3 UUID corresponding to the given namespace and value
        Throws:
        NullPointerException - when namespace or name are null
      • v5

        public static UUID v5​(UUID namespace,
                              String name)
                       throws NullPointerException
        Return the Version 5 UUID for the given namespace UUID and name
        Parameters:
        namespace - UUID value for the namespace
        name - Namespaced value
        Returns:
        Version 5 UUID corresponding to the given namespace and value
        Throws:
        NullPointerException - when namespace or name are null