public class EnumValueMap<E extends java.lang.Enum<E>> extends java.lang.Object
This can be used instead of EnumUtils.valueOf() (or
In case of looking up strings that do not exist as enum constant EnumUtils
has to catch an IllegalArgumentException which has an even bigger performance
impact. This implementation simply returns null
if the element
is not found without this overhead.
Constructor and Description |
---|
EnumValueMap(java.lang.Class<E> enumType)
Constructor for a case sensitive map.
|
EnumValueMap(java.lang.Class<E> enumType,
boolean caseSensisitve)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
E |
valueOf(java.lang.String name)
Gets the enum value with the given name from an internal lookup map.
|
public EnumValueMap(java.lang.Class<E> enumType)
public EnumValueMap(java.lang.Class<E> enumType, boolean caseSensisitve)