Modifier and Type | Method and Description |
---|---|
static <T extends Enum<T>> |
names(Class<T> enumType)
Returns a set of the names of the enum constants of the specified enum type.
|
static <T extends Enum<T>> |
valueOf(Class<T> enumType,
Object name)
Returns the enum constant of the specified enum type with the specified name, or
null if the specified enum type has no constant with the specified name, or
if the specified class object does not represent an enum type. |
public static <T extends Enum<T>> Set<String> names(Class<T> enumType)
T
- enumeration typeenumType
- the class of the enum type from which to return the names.public static <T extends Enum<T>> T valueOf(Class<T> enumType, Object name)
null
if the specified enum type has no constant with the specified name, or
if the specified class object does not represent an enum type.T
- enumeration typeenumType
- the class of the enum type from which to return a constant.name
- the name of the constant to return.null
if no match found.Copyright 2011-2015 ForgeRock AS.