Modification allows access and manipulation of the bit mask for the elements so this class can be easily converted between long/int and BitFieldSet to use as efficient option flags in implementation but convenient enum sets for manipulation.
If the Enum implements BitField then each field can have 1..N bits up to a maximum total of 64 bits per enum.
The class provides methods for setting and getting values from these fields as long, int, short or byte values, either signed or unsigned.
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private class | |
| private static class | BitFieldSet.
This class is used to serialize all EnumSet instances, regardless of implementation type. |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final long[] | bitMasks
All bit masks for each field since some can span more than one |
| pack-priv long | elements
Bit vector representation of this set. |
| pack-priv final Class | elementType
The class of all the elements of this set. |
| private static final long | |
| pack-priv final int | totalBits
total number of bits used by all fields |
| pack-priv final E[] | universe
All values comprising T |
| pack-priv static final Enum |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public final boolean | add(E...
element to be added to this set rest)Overrides java. Implements java. Adds the specified element to this set if it is not already present (optional operation). |
| public boolean | Returns: true if the set changed as a result of the callelement to be added to this set e)Overrides java. Implements java. Adds the specified element to this set if it is not already present. |
| pack-priv void | |
| public boolean | Returns: true if this set changed as a result of the callcollection whose elements are to be added to this set c)Overrides java. Implements java. Adds all of the elements in the specified collection to this set. |
| pack-priv void | |
| public boolean | |
| public static boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public final boolean | |
| public long | |
| public static < The class of the elements in the set E extends Enum | |
| public boolean | |
| public static long | |
| public boolean | |
| public static boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public final boolean | |
| public void | clear()
Overrides java. Implements java. Removes all of the elements from this set. |
| public BitFieldSet | |
| public void | |
| public static < The class of the elements in the enum set E extends Enum | Returns: The complement of the specified set in this setthe enum set from whose complement to initialize this enum set s)Creates an enum set with the same element type as the specified enum set, initially containing all the elements of this type that are not contained in the specified set. |
| public boolean | Returns: true if this set contains the specified elementelement to be checked for containment in this collection e)Overrides java. Implements java. Returns true if this set contains the specified element. |
| public boolean | Returns: true if this set contains all of the elements in the specified collectioncollection to be checked for containment in this set c)Overrides java. Implements java. Returns true if this set contains all of the elements in the specified collection. |
| public static < The class of the elements in the set E extends Enum | Returns: A copy of the specified enum set.the enum set from which to initialize this enum set s)Creates an enum set with the same element type as the specified enum set, initially containing the same elements (if any). |
| public static < The class of the elements in the collection E extends Enum | Returns: An enum set initialized from the given collection.the collection from which to initialize this enum set c)Hides java. Creates an enum set initialized from the specified collection. |
| public boolean | Returns: true if the specified object is equal to this setobject to be compared for equality with this set o)Overrides java. Implements java. Compares the specified object with this set for equality. |
| public long | Returns: unsigned valuefield to get e1)Returns unsigned value for the field, except if the field is 64 bits |
| public static < type of enum E extends Enum | Returns: unsigned valuebit mask for elements elements, E field to get e1)Returns signed value for the field, except if the field is 64 bits |
| public static <E extends Enum | |
| public static <E extends Enum | |
| public static <E extends Enum | |
| public static < type of enum E extends Enum | Returns: array of bit masks for enum valuesclass of enum elementType)Returns all of the values comprising E. |
| public byte | |
| public int | |
| public long | Returns: unsigned valuefield to get e1)Returns signed value for the field, except if the field is 64 bits |
| public short | |
| public long | |
| pack-priv static <E extends Enum | |
| public static int | |
| public byte | |
| public int | |
| public static < type of enum E extends Enum | Returns: array of enum valuesclass of enum elementType)Returns all of the values comprising E. |
| public long | |
| public static < type of enum E extends Enum | Returns: unsigned valuebit mask for elements elements, E field to get e1, int maximum bits for type maxBits, String name of type typeName)Returns unsigned value for the field, except if the field is 64 bits |
| public short | |
| public static <E extends Enum | |
| public boolean | Returns: true if this set contains no elementsOverrides java. Implements java. Returns |
| public @NotNull Iterator | Returns: an iterator over the elements contained in this setImplements abstract java. Implements java. Returns an iterator over the elements contained in this set. |
| public static <E extends Enum | |
| public long | |
| public long | |
| public long | |
| public long | |
| public long | |
| public final long | |
| public static long | |
| public boolean | |
| public static boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public final boolean | |
| public static < The class of the elements in the set E extends Enum | |
| public static < enum type T extends Enum | Returns: bit enum setclass of the enum enumClass, long bit mask for items mask)Hides java. Create a bit enum set from a bit mask |
| public static < The class of the specified element and of the set E extends Enum | Returns: an enum set initially containing the specified elementthe element that this set is to contain initially e)Hides java. Creates an enum set initially containing the specified element. |
| public static < The class of the parameter elements and of the set E extends Enum | Returns: an enum set initially containing the specified elementsan element that this set is to contain initially e1, E another element that this set is to contain initially e2)Hides java. Creates an enum set initially containing the specified elements. |
| public static < The class of the parameter elements and of the set E extends Enum | Returns: an enum set initially containing the specified elementsan element that this set is to contain initially e1, E another element that this set is to contain initially e2, E another element that this set is to contain initially e3)Hides java. Creates an enum set initially containing the specified elements. |
| public static < The class of the parameter elements and of the set E extends Enum | Returns: an enum set initially containing the specified elementsan element that this set is to contain initially e1, E another element that this set is to contain initially e2, E another element that this set is to contain initially e3, E another element that this set is to contain initially e4)Hides java. Creates an enum set initially containing the specified elements. |
| public static < The class of the parameter elements and of the set E extends Enum | Returns: an enum set initially containing the specified elementsan element that this set is to contain initially e1, E another element that this set is to contain initially e2, E another element that this set is to contain initially e3, E another element that this set is to contain initially e4, E another element that this set is to contain initially e5)Hides java. Creates an enum set initially containing the specified elements. |
| public static < The class of the parameter elements and of the set E extends Enum | Returns: an enum set initially containing the specified elementsan element that the set is to contain initially first, E... the remaining elements the set is to contain initially rest)Hides java. Creates an enum set initially containing the specified elements. |
| public static < The class of the parameter elements and of the set E extends Enum | Returns: an enum set initially containing the specified elementsdeclaring class of enum declaringClass, E[] the remaining elements the set is to contain initially rest)Hides java. Creates an enum set initially containing the specified elements. |
| public boolean | |
| public static long | |
| public static < The class of the parameter elements and of the set E extends Enum | Returns: an enum set initially containing all of the elements in the range defined by the two specified endpointsthe first element in the range from, E the last element in the range to)Creates an enum set initially containing all of the elements in the range defined by the two specified endpoints. |
| private void | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public final boolean | |
| public boolean | Returns: true if the set contained the specified elementelement to be removed from this set, if present e)Overrides java. Implements java. Removes the specified element from this set if it is present. |
| public boolean | Returns: true if this set changed as a result of the callelements to be removed from this set c)Overrides java. Implements java. Removes from this set all of its elements that are contained in the specified collection. |
| public boolean | Returns: true if any field values were modifiedbit fields values mask)
Deprecated
use
setAll(long)
Set all bit fields to values in mask |
| public boolean | Returns: true if this set changed as a result of the callelements to be retained in this set c)Overrides java. Implements java. Retains only the elements in this set that are contained in the specified collection. |
| public boolean | |
| public void | |
| public void | |
| public void | |
| public void | |
| public static <E extends Enum | |
| public static <E extends Enum | |
| public static <E extends Enum | |
| public static <E extends Enum | |
| public boolean | Returns: true if elements changed by operationfield e1, long value to set value)Set a signed value for the field |
| pack-priv static <E extends Enum | |
| pack-priv static <E extends Enum | |
| public boolean | Returns: true if elements changed by operationfield e1, long value to set value)Set a signed value for the field |
| pack-priv static <E extends Enum | |
| pack-priv static <E extends Enum | setUnsigned(Class<E> elementType, long[] bitMasks, long elements, E
field e1, long value to set value)Set an unsigned value for the field |
| public void | |
| public void | |
| public void | |
| public void | |
| public int | Returns: the number of elements in this setImplements abstract java. Implements java. Returns the number of elements in this set. |
| public byte | |
| public int | |
| public long | |
| public short | |
| public String | toString()
Overrides java. Returns a string representation of this collection. |
| pack-priv final void | |
| pack-priv Object |