Constructor and Description |
---|
EnumFactory(Class<E> enumClass) |
EnumFactory(Class<E> enumClass,
E defaultEnum) |
EnumFactory(Class<E> enumClass,
E defaultEnum,
boolean caseSensitive) |
Modifier and Type | Method and Description |
---|---|
E |
fromLabel(String label)
Gets enum from label
|
Enum<E> |
getDefaultEnum()
Gets the default enum
|
String |
getDefaultLabel()
Gets the default label
|
String |
label(E e)
Gets the label for the specified enum
|
E |
toEnum(String label)
Gets enum from label
NOTE: If specified label is invalid, the default enum is returned
|
boolean |
validLabel(String label)
Is valid label?
|
public Enum<E> getDefaultEnum()
public String getDefaultLabel()
public String label(E e)
e
- enumpublic boolean validLabel(String label)
label
- Stringpublic E fromLabel(String label)
label
- StringCopyright © 2005–2016 Alfresco Software. All rights reserved.