#ThreadSafe#
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public | EnumUtils()
Deprecated
TODO Make private in 4.0.
This constructor is public to permit tools that require a JavaBean instance to operate. |
| Modifier and Type | Method and Description |
|---|---|
| private static < the type of the enumeration. E extends Enum | |
| private static < the type of the enumeration. E extends Enum | Returns: enumClass.to check. enumClass)Validate that |
| public static < the type of the enumeration. E extends Enum | Returns: a long whose value provides a binary representation of the given set of enum values.the class of the enum we are working with, not enumClass, final E... null.the values we want to convert, not values)null.Creates a long bit vector representation of the given array of Enum values. |
| public static < the type of the enumeration. E extends Enum | Returns: a long whose value provides a binary representation of the given set of enum values.the class of the enum we are working with, not enumClass, final Iterable<? extends E> null.the values we want to convert, not values)null, neither containing null.Creates a long bit vector representation of the given subset of an Enum. |
| public static < the type of the enumeration. E extends Enum | Returns: a long[] whose values provide a binary representation of the given set of enum values with the least significant digits rightmost.the class of the enum we are working with, not enumClass, final E... null.the values we want to convert, not values)null, neither containing null.Creates a bit vector representation of the given subset of an Enum using as many |
| public static < the type of the enumeration. E extends Enum | Returns: a long[] whose values provide a binary representation of the given set of enum values with the least significant digits rightmost.the class of the enum we are working with, not enumClass, final Iterable<? extends E> null.the values we want to convert, not values)null, neither containing null.Creates a bit vector representation of the given subset of an Enum using as many |
| public static < the type of the enumeration. E extends Enum | |
| public static < the type of the enumeration. E extends Enum | Returns: the enum, default enum if not found.the class of the enum to query, null returns default enum. enumClass, final String the enum name, null returns default enum. enumName, final E the default enum. defaultEnum)Gets the enum for the class, returning |
| public static < the type of the enumeration. E extends Enum | Returns: the enum, null if not found.the class of the enum to query, may be null. enumClass, final String the enum name, null returns null. enumName)Gets the enum for the class, returning |
| public static < the type of the enumeration. E extends Enum | Returns: the enum, default enum if not found.the class of the enum to query, null returns default enum. enumClass, final String the enum name, null returns default enum. enumName, final E the default enum. defaultEnum)Gets the enum for the class, returning |
| public static < the type of the enumeration. E extends Enum | Returns: the modifiable list of enums, never null.the class of the enum to query, not null. enumClass)Gets the |
| public static < the type of the enumeration. E extends Enum | Returns: the modifiable map of enum names to enums, never null.the class of the enum to query, not null. enumClass)Gets the |
| public static < the type of enumeration. E extends Enumthe type of the map key. K> Map | Returns: the modifiable map of enums, never null.the class of the enum to query, not null. enumClass, final Function<E, K> the function to query for the key, not null. keyFunction)Gets the |
| public static < the type of the enumeration. E extends Enum | Returns: the enum, default enum if not found.the class of the enum to query, not null. enumClass, final String the system property key for the enum name, null returns default enum. propName, final E the default enum. defaultEnum)Gets the enum for the class in a system property, returning |
| public static < the type of the enumeration. E extends Enum | Returns: an enum, default enum if not found.the class of the enum to query, not null. enumClass, final int the enum name, null returns default enum. value, final ToIntFunction<E> the function that gets an int for an enum for comparison to toIntFunction, final E value.the default enum. defaultEnum)Gets the enum for the class and value, returning |
| public static < the type of the enumeration. E extends Enum | Returns: an enum, default enum if not found.the class of the enum to query, null returns default enum. enumClass, final String the enum name, null returns default enum. enumName, final Function<E, String> the function that gets the string for an enum for comparison to stringFunction, final E enumName.the default enum. defaultEnum)Gets the enum for the class, returning |
| private static <E extends Enum | |
| public static < the type of the enumeration. E extends Enum | Returns: true if the enum name is valid, otherwise false.the class of the enum to query, null returns false. enumClass, final String the enum name, null returns false. enumName)Checks if the specified name is a valid enum for the class. |
| public static < the type of the enumeration. E extends Enum | Returns: true if the enum name is valid, otherwise false.the class of the enum to query, null returns false. enumClass, final String the enum name, null returns false. enumName)Checks if the specified name is a valid enum for the class. |
| public static < the type of the enumeration. E extends Enum | Returns: a set of enum values.the class of the enum we are working with, not enumClass, final long null.the long value representation of a set of enum values. value)Convert a long value created by |
| public static < the type of the enumeration. E extends Enum | Returns: a set of enum values.the class of the enum we are working with, not enumClass, final long... null.the long[] bearing the representation of a set of enum values, the least significant digits rightmost, not values)null.Convert a |
| public static < the type of stream elements. T> Stream |
| CANNOT_STORE_S_S_VALUES_IN_S_BITS | back to summary |
|---|---|
| private static final String CANNOT_STORE_S_S_VALUES_IN_S_BITS | |
| ENUM_CLASS_MUST_BE_DEFINED | back to summary |
|---|---|
| private static final String ENUM_CLASS_MUST_BE_DEFINED | |
| NULL_ELEMENTS_NOT_PERMITTED | back to summary |
|---|---|
| private static final String NULL_ELEMENTS_NOT_PERMITTED | |
| S_DOES_NOT_SEEM_TO_BE_AN_ENUM_TYPE | back to summary |
|---|---|
| private static final String S_DOES_NOT_SEEM_TO_BE_AN_ENUM_TYPE | |
| EnumUtils | back to summary |
|---|---|
| public EnumUtils()
Deprecated TODO Make private in 4.0. This constructor is public to permit tools that require a JavaBean instance to operate.
| |
| asEnum | back to summary |
|---|---|
| private static <E extends Enum Validate
| |
| checkBitVectorable | back to summary |
|---|---|
| private static <E extends Enum Validate that
| |
| generateBitVector | back to summary |
|---|---|
| public static <E extends Enum Creates a long bit vector representation of the given array of Enum values. This generates a value that is usable by Do not use this method if you have more than 64 values in your Enum, as this would create a value greater than a long can hold.
| |
| generateBitVector | back to summary |
|---|---|
| public static <E extends Enum Creates a long bit vector representation of the given subset of an Enum. This generates a value that is usable by Do not use this method if you have more than 64 values in your Enum, as this would create a value greater than a long can hold.
| |
| generateBitVectors | back to summary |
|---|---|
| public static <E extends Enum Creates a bit vector representation of the given subset of an Enum using as many This generates a value that is usable by Use this method if you have more than 64 values in your Enum.
| |
| generateBitVectors | back to summary |
|---|---|
| public static <E extends Enum Creates a bit vector representation of the given subset of an Enum using as many This generates a value that is usable by Use this method if you have more than 64 values in your Enum.
| |
| getEnum | back to summary |
|---|---|
| public static <E extends Enum Gets the enum for the class, returning This method differs from | |
| getEnum | back to summary |
|---|---|
| public static <E extends Enum Gets the enum for the class, returning This method differs from | |
| getEnumIgnoreCase | back to summary |
|---|---|
| public static <E extends Enum Gets the enum for the class, returning This method differs from | |
| getEnumIgnoreCase | back to summary |
|---|---|
| public static <E extends Enum Gets the enum for the class, returning This method differs from | |
| getEnumList | back to summary |
|---|---|
| public static <E extends Enum Gets the This method is useful when you need a list of enums rather than an array. | |
| getEnumMap | back to summary |
|---|---|
| public static <E extends Enum Gets the This method is useful when you need a map of enums by name. | |
| getEnumMap | back to summary |
|---|---|
| public static <E extends Enum Gets the This method is useful when you need a map of enums by name. | |
| getEnumSystemProperty | back to summary |
|---|---|
| public static <E extends Enum Gets the enum for the class in a system property, returning
This method differs from
If a | |
| getFirstEnum | back to summary |
|---|---|
| public static <E extends Enum Gets the enum for the class and value, returning
This method differs from
| |
| getFirstEnumIgnoreCase | back to summary |
|---|---|
| public static <E extends Enum Gets the enum for the class, returning This method differs from
| |
| isEnum | back to summary |
|---|---|
| private static <E extends Enum | |
| isValidEnum | back to summary |
|---|---|
| public static <E extends Enum Checks if the specified name is a valid enum for the class.
This method differs from | |
| isValidEnumIgnoreCase | back to summary |
|---|---|
| public static <E extends Enum Checks if the specified name is a valid enum for the class.
This method differs from | |
| processBitVector | back to summary |
|---|---|
| public static <E extends Enum Convert a long value created by If you store this value, beware any changes to the enum that would affect ordinal values.
| |
| processBitVectors | back to summary |
|---|---|
| public static <E extends Enum Convert a If you store this value, beware any changes to the enum that would affect ordinal values.
| |
| stream | back to summary |
|---|---|
| public static <T> Stream Returns a sequential ordered stream whose elements are the given class' enum values.
| |