Package com.illumon.util.type
Class EnumValue
java.lang.Object
com.illumon.util.type.EnumValue
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Enum<?>>
TcaseInsensitiveValueOf
(Class<T> enumClass, String value) Retrieves the enum constant whose name matches a given value according to case-insensitive comparison.
-
Constructor Details
-
EnumValue
public EnumValue()
-
-
Method Details
-
caseInsensitiveValueOf
Retrieves the enum constant whose name matches a given value according to case-insensitive comparison.- Parameters:
enumClass
- the enum type we are queryingvalue
- the constant value we are looking up- Returns:
- the enum constant
- Throws:
IllegalArgumentException
- when value is not found in the Enum's constants
-