- 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.List of variants:
-
-
Enum Constant Summary
Enum Constants Enum Constant Description VARIANT_RESERVED_FUTUREReserved for future definition.VARIANT_RESERVED_MICROSOFTReserved for Microsoft Corporation backward compatibility.VARIANT_RESERVED_NCSReserved for NCS backward compatibility.VARIANT_RFC_4122The variant specified in 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
Reserved for NCS backward compatibility.
-
VARIANT_RFC_4122
public static final UuidVariant VARIANT_RFC_4122
The variant specified in RFC-4122.
-
VARIANT_RESERVED_MICROSOFT
public static final UuidVariant VARIANT_RESERVED_MICROSOFT
Reserved for Microsoft Corporation backward compatibility.
-
VARIANT_RESERVED_FUTURE
public static final UuidVariant VARIANT_RESERVED_FUTURE
Reserved for future definition.
-
-
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)
-
-