Package org.infinispan.commons.util
Class EnumUtil
- java.lang.Object
-
- org.infinispan.commons.util.EnumUtil
-
public class EnumUtil extends Object
Utilities method to Enums.- Since:
- 8.2
- Author:
- Pedro Ruivo
-
-
Field Summary
Fields Modifier and Type Field Description static long
EMPTY_BIT_SET
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static long
bitSetOf(Enum<?> first)
static long
bitSetOf(Enum<?>[] flags)
static long
bitSetOf(Enum<?> first, Enum<?> second)
static long
bitSetOf(Enum<?> first, Enum<?> second, Enum<?>... remaining)
static <E extends Enum<E>>
longbitSetOf(Collection<E> enums)
static int
bitSetSize(long bitSet)
static boolean
containsAll(long bitSet, long testBitSet)
static boolean
containsAny(long bitSet, long testBitSet)
static long
diffBitSets(long bitSet1, long bitSet2)
static <E extends Enum<E>>
E[]enumArrayOf(long bitSet, Class<E> eClass)
static <E extends Enum<E>>
EnumSet<E>enumSetOf(long bitSet, Class<E> eClass)
static boolean
hasEnum(long bitSet, Enum<?> anEnum)
static long
mergeBitSets(long bitSet1, long bitSet2)
static <E extends Enum<E>>
StringprettyPrintBitSet(long bitSet, Class<E> eClass)
static long
setEnum(long bitSet, Enum<?> anEn)
static <E extends Enum<E>>
longsetEnums(long bitSet, Collection<E> enums)
static long
unsetEnum(long bitSet, Enum<?> anEnum)
-
-
-
Field Detail
-
EMPTY_BIT_SET
public static final long EMPTY_BIT_SET
- See Also:
- Constant Field Values
-
-
Method Detail
-
bitSetOf
public static <E extends Enum<E>> long bitSetOf(Collection<E> enums)
-
bitSetOf
public static long bitSetOf(Enum<?> first)
-
bitSetOf
public static long bitSetOf(Enum<?>[] flags)
-
hasEnum
public static boolean hasEnum(long bitSet, Enum<?> anEnum)
-
setEnum
public static long setEnum(long bitSet, Enum<?> anEn)
-
setEnums
public static <E extends Enum<E>> long setEnums(long bitSet, Collection<E> enums)
-
unsetEnum
public static long unsetEnum(long bitSet, Enum<?> anEnum)
-
prettyPrintBitSet
public static <E extends Enum<E>> String prettyPrintBitSet(long bitSet, Class<E> eClass)
-
mergeBitSets
public static long mergeBitSets(long bitSet1, long bitSet2)
-
diffBitSets
public static long diffBitSets(long bitSet1, long bitSet2)
-
containsAll
public static boolean containsAll(long bitSet, long testBitSet)
-
containsAny
public static boolean containsAny(long bitSet, long testBitSet)
-
bitSetSize
public static int bitSetSize(long bitSet)
-
-