Type Params | Return Type | Name and description |
---|---|---|
<E extends def> |
static E |
findEnum(java.lang.Class<E> enumClass, java.lang.String value) |
<E extends def> |
static E |
findEnum(java.lang.Class<E> enumClass, java.lang.String key, java.util.Map<java.lang.String, java.lang.Object> map, E defaultValue) |
<E extends def> |
static E |
findMatchingEnum(java.lang.String property, java.lang.Object key, java.util.Map<java.lang.String, E> map, E defaultValue) |
<E extends def> |
static E |
getRequiredEnum(java.lang.Class<E> enumClass, java.lang.String property, java.lang.String value) |
<E extends def> |
static java.util.List<java.lang.String> |
getValidEnumList(java.lang.Class<E> enumClass) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Gets the enum for the specified class, returning null
if not found.
This method differs from java.lang.Enum#valueOf in that it finds the enum based on its toString method or its getName method if its an instance of
- the type of the enumerationenumClass
- the class of the enum to query, not nullvalue
- the enum as a string as returned by its toString method, null returns null
Returns the value to which the specified key is mapped as an Enum of the specified enumClass, returning the defaultValue if there is no value in the map or it's not a String.
This method finds the enum based on its toString method or its getName method if its an instance of
- the type of the enumerationenumClass
- the class of the enum to query, not nullkey
- the enum as a string as returned by its toString methodmap
- the map to search in for the key
Returns the enum mapped by the specified key in the specified map, returning the defaultValue if the key or map is null.
- the type of the enumerationproperty
- used in the exception message to inform caller which property is invalidkey
- the key to look for in the specified mapmap
- the map to search in for the key
Gets the enum for the specified class, throwing IllegalArgumentException if not found.
This method finds the enum based on its toString method or its getName method if its an instance of
- the type of the enumerationenumClass
- the class of the enum to query, not nullproperty
- used in the exception message to inform caller which property is invalidvalue
- the enum as a string as returned by its toString method
Gets the List
of enum's string value based on its toString method or its getName method if its an instance of
- the type of the enumerationenumClass
- the class of the enum to query, not null