Top Description Constructors Methods
org.yaml.snakeyaml.util

public Class EnumUtils

extends Object
Class Inheritance

Helper

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static <
- the enum type whose constant is to be returned
T extends Enum<T>
>
T

Returns:

the enum constant of the specified enum type with the specified name, insensitive to case
findEnumInsensitiveCase
(Class<T>
- the Class object of the enum type from which to return a constant
enumType
,
String
- the name of the constant to return
name
)

Looks for an enumeration constant that matches the string without being case sensitive

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

EnumUtilsback to summary
public EnumUtils()

Method Detail

findEnumInsensitiveCaseback to summary
public static <T extends Enum<T>> T findEnumInsensitiveCase(Class<T> enumType, String name)

Looks for an enumeration constant that matches the string without being case sensitive

Parameters
<T>
- the enum type whose constant is to be returned
enumType:Class<T>

- the Class object of the enum type from which to return a constant

name:String

- the name of the constant to return

Returns:T

the enum constant of the specified enum type with the specified name, insensitive to case

Exceptions
IllegalArgumentException:
– if the specified enum type has no constant with the specified name, insensitive case