Package com.github.f4b6a3.uuid.enums
Enum UuidVariant
- java.lang.Object
-
- java.lang.Enum<UuidVariant>
-
- com.github.f4b6a3.uuid.enums.UuidVariant
-
- All Implemented Interfaces:
Serializable,Comparable<UuidVariant>
public enum UuidVariant extends Enum<UuidVariant>
UUID variants defined by RFC-4122.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description VARIANT_RESERVED_FUTUREVARIANT_RESERVED_MICROSOFTVARIANT_RESERVED_NCSVARIANT_RFC_4122
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetValue()static UuidVariantgetVariant(int value)static UuidVariantvalueOf(String name)Returns the enum constant of this type with the specified name.static UuidVariant[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
VARIANT_RESERVED_NCS
public static final UuidVariant VARIANT_RESERVED_NCS
-
VARIANT_RFC_4122
public static final UuidVariant VARIANT_RFC_4122
-
VARIANT_RESERVED_MICROSOFT
public static final UuidVariant VARIANT_RESERVED_MICROSOFT
-
VARIANT_RESERVED_FUTURE
public static final UuidVariant VARIANT_RESERVED_FUTURE
-
-
Method Detail
-
values
public static UuidVariant[] 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 (UuidVariant c : UuidVariant.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static UuidVariant 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 int getValue()
-
getVariant
public static UuidVariant getVariant(int value)
-
-