- java.lang.Object
-
- java.lang.Enum<UuidNamespace>
-
- com.github.f4b6a3.uuid.enums.UuidNamespace
-
- All Implemented Interfaces:
Serializable,Comparable<UuidNamespace>
public enum UuidNamespace extends Enum<UuidNamespace>
Name spaces defined by RFC-4122, used to create name-based unique identifiers (UUIDv3 and UUIDv5).List of name spaces:
NAMESPACE_DNS: 6ba7b810-9dad-11d1-80b4-00c04fd430c8NAMESPACE_URL: 6ba7b811-9dad-11d1-80b4-00c04fd430c8NAMESPACE_OID: 6ba7b812-9dad-11d1-80b4-00c04fd430c8NAMESPACE_X500: 6ba7b814-9dad-11d1-80b4-00c04fd430c8
-
-
Enum Constant Summary
Enum Constants Enum Constant Description NAMESPACE_DNSName space to be used when the name string is a fully-qualified domain name.NAMESPACE_OIDName space to be used when the name string is an ISO OID.NAMESPACE_URLName space to be used when the name string is a URL.NAMESPACE_X500Name space to be used when the name string is an X.500 DN (DER or text).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static UuidNamespacegetNamespace(UUID value)UUIDgetValue()static UuidNamespacevalueOf(String name)Returns the enum constant of this type with the specified name.static UuidNamespace[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NAMESPACE_DNS
public static final UuidNamespace NAMESPACE_DNS
Name space to be used when the name string is a fully-qualified domain name.
-
NAMESPACE_URL
public static final UuidNamespace NAMESPACE_URL
Name space to be used when the name string is a URL.
-
NAMESPACE_OID
public static final UuidNamespace NAMESPACE_OID
Name space to be used when the name string is an ISO OID.
-
NAMESPACE_X500
public static final UuidNamespace NAMESPACE_X500
Name space to be used when the name string is an X.500 DN (DER or text).
-
-
Method Detail
-
values
public static UuidNamespace[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (UuidNamespace c : UuidNamespace.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static UuidNamespace valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
public UUID getValue()
-
getNamespace
public static UuidNamespace getNamespace(UUID value)
-
-