public interface ValueEnum<T>
Modifier and Type | Method and Description |
---|---|
T |
getValue()
Get the value.
|
static <T extends Enum<T>> |
of(Class<T> enumType,
Object value)
Get the constant of the specified enum type with the specified value.
|
T getValue()
static <T extends Enum<T>> T of(Class<T> enumType, Object value)
T
- the enum type whose constant is to be returnedenumType
- the Class
object of the enum type from which to return a constantvalue
- the value of the constant to returnNullPointerException
- if the specified value is nullIllegalArgumentException
- if specified enumType is not an enum or no constant found for
the specified value