public final class EnumSupport extends Object
| Modifier and Type | Method and Description |
|---|---|
static <E extends Enum<?>> |
fromString(Class<E> enumClass,
String value)
Support method to help enums implement an enhanced
valueOf(String) method, that does not throw an
IllegalArgumentException in case of incoming values, that do not match any of the enum's values. |
static <A extends Enum> |
parseEnum(A e)
Create a function to parse a string into an Enum value.
|
public static <E extends Enum<?>> E fromString(Class<E> enumClass, String value)
valueOf(String) method, that does not throw an
IllegalArgumentException in case of incoming values, that do not match any of the enum's values.enumClass - the enum's classvalue - the value to look upCopyright © 2009–2020 Opencast Project. All rights reserved.