Package com.github.f4b6a3.uuid.enums
Enum UuidNamespace
- 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 used to create name-based UUIDs.Name spaces predefined by RFC-4122 (Appendix C): - NAMESPACE_DNS: Name string is a fully-qualified domain name; - NAMESPACE_URL: Name string is a URL; - NAMESPACE_ISO_OID: Name string is an ISO OID; - NAMESPACE_X500_DN: Name string is an X.500 DN (in DER or a text format).
Source: RFC-4122 - Appendix C - Some Name Space IDs https://tools.ietf.org/html/rfc4122#appendix-C
-
-
Enum Constant Summary
Enum Constants Enum Constant Description NAMESPACE_DNSNAMESPACE_ISO_OIDNAMESPACE_URLNAMESPACE_X500_DN
-
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
-
NAMESPACE_URL
public static final UuidNamespace NAMESPACE_URL
-
NAMESPACE_ISO_OID
public static final UuidNamespace NAMESPACE_ISO_OID
-
NAMESPACE_X500_DN
public static final UuidNamespace NAMESPACE_X500_DN
-
-
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)
-
-