Package com.smartgwt.client.util
Class EnumUtil
java.lang.Object
com.smartgwt.client.util.EnumUtil
Utils for manipulate with a Enum.
-
Constructor Details
-
EnumUtil
public EnumUtil()
-
-
Method Details
-
getEnum
Get a enum item by value.- Parameters:
enums
- - enum itemsvalue
- - enum value- Returns:
- enum item
- See Also:
-
getEnums
public static <TYPE extends ValueEnum> TYPE[] getEnums(TYPE[] enums, String[] values, TYPE[] result) Get a enum items by values.The java 1.6 does not support a code " {@code (TYPE[]) new Object[values.length];". Also, the GWT does not support a reflection api ( {@link java.lang.reflect.Array#newInstance}). So you need to pass an array argument to store the result. @param enums - enum items @param values - enum values @param result - array to store the result @return enum items
-
getEnums
Deprecated.use {getEnums(ValueEnum[], String[], ValueEnum[])
methodGet a enum items by values.This method is not compatible with the java 1.6.
- Parameters:
enums
- - enum itemsvalues
- - enum values- Returns:
- enum items
- See Also:
-
getEnums(ValueEnum[], String[], ValueEnum[])
method