Package org.yaml.snakeyaml.util
Class EnumUtils
java.lang.Object
org.yaml.snakeyaml.util.EnumUtils
Helper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Enum<T>>
TfindEnumInsensitiveCase
(Class<T> enumType, String name) Looks for an enumeration constant that matches the string without being case sensitive
-
Constructor Details
-
EnumUtils
public EnumUtils()
-
-
Method Details
-
findEnumInsensitiveCase
Looks for an enumeration constant that matches the string without being case sensitive- Type Parameters:
T
- - the enum type whose constant is to be returned- Parameters:
enumType
- - the Class object of the enum type from which to return a constantname
- - the name of the constant to return- Returns:
- the enum constant of the specified enum type with the specified name, insensitive to case
- Throws:
IllegalArgumentException
- – if the specified enum type has no constant with the specified name, insensitive case
-