Package com.axelor.db
Interface ValueEnum<T>
-
- All Known Implementing Classes:
ViewCustomizationPermission
public interface ValueEnum<T>
Enum type fields with custom values should implement this interface.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description T
getValue()
Get the value.static <T extends Enum<T>>
Tof(Class<T> enumType, Object value)
Get the constant of the specified enum type with the specified value.
-
-
-
Method Detail
-
getValue
T getValue()
Get the value.- Returns:
- custom value associated with this enum constant.
-
of
static <T extends Enum<T>> T of(Class<T> enumType, Object value)
Get the constant of the specified enum type with the specified value.- Type Parameters:
T
- the enum type whose constant is to be returned- Parameters:
enumType
- theClass
object of the enum type from which to return a constantvalue
- the value of the constant to return- Returns:
- the enum constant of the specified enum type with the specified value
- Throws:
NullPointerException
- if the specified value is nullIllegalArgumentException
- if specified enumType is not an enum or no constant found for the specified value
-
-