public class EnumUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
UNINITIALIZED
Uninitialized integer flag
|
| Constructor and Description |
|---|
EnumUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <E extends Enum<E>> |
fromInteger(int idx,
Class<E> clazz) |
static <T extends FlagEnum> |
setFromInteger(int flags,
Class<T> clazz) |
static <T extends FlagEnum> |
setToInteger(Set<T> set) |
static <E extends Enum<E>> |
toInteger(E val) |
public static final int UNINITIALIZED
public static <E extends Enum<E>> int toInteger(E val)
val - the enumpublic static <E extends Enum<E>> E fromInteger(int idx, Class<E> clazz)
idx - the enum indexclazz - the enum classpublic static <T extends FlagEnum> Set<T> setFromInteger(int flags, Class<T> clazz)
flags - the ORed flagsclazz - the enum class