Modifier and Type | Class and Description |
---|---|
private class |
Modifier and Type | Field and Description |
---|---|
private long[] | elements
Bit vector representation of this set. |
private static final long | |
private int |
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
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 | addAll()
Implements abstract java. Adds all of the elements from the appropriate enum type to this enum set, which is empty prior to the call. |
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 | addRange(E from, E to)
Implements abstract java. Adds the specified range to this enum set, which is empty prior to the call. |
public void | clear()
Overrides java. Implements java. Removes all of the elements from this set. |
public EnumSet | |
pack-priv void | complement()
Implements abstract java. Complements the contents of this enum 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 |
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 |
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 boolean | Returns: true if this set contains no elementsOverrides java. Implements java. Returns |
public 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. |
private 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 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 int | Returns: the number of elements in this setImplements abstract java. Implements java. Returns the number of elements in this set. |
elements | back to summary |
---|---|
private long[] elements Bit vector representation of this set. The ith bit of the jth element of this array represents the presence of universe[64*j +i] in this set. |
serialVersionUID | back to summary |
---|---|
private static final long serialVersionUID Hides java. |
size | back to summary |
---|---|
private int size |
JumboEnumSet | back to summary |
---|---|
pack-priv JumboEnumSet(Class<E> elementType, Enum<?>[] universe) |
add | back to summary |
---|---|
public boolean add(E e) Overrides java. Implements java. Adds the specified element to this set if it is not already present.
|
addAll | back to summary |
---|---|
pack-priv void addAll() Implements abstract java. Doc from java. Adds all of the elements from the appropriate enum type to this enum set, which is empty prior to the call. |
addAll | back to summary |
---|---|
public boolean addAll(Collection<? extends E> c) Overrides java. Implements java. Adds all of the elements in the specified collection to this set.
|
addRange | back to summary |
---|---|
pack-priv void addRange(E from, E to) Implements abstract java. Doc from java. Adds the specified range to this enum set, which is empty prior to the call. |
clear | back to summary |
---|---|
public void clear() Overrides java. Implements java. Removes all of the elements from this set. |
clone | back to summary |
---|---|
public EnumSet Overrides java. Doc from java. Returns a copy of this set.
|
complement | back to summary |
---|---|
pack-priv void complement() Implements abstract java. Doc from java. Complements the contents of this enum set. |
contains | back to summary |
---|---|
public boolean contains(Object e) Overrides java. Implements java. Returns
|
containsAll | back to summary |
---|---|
public boolean containsAll(Collection<?> c) Overrides java. Implements java. Returns
|
equals | back to summary |
---|---|
public boolean equals(Object o) Overrides java. Implements java. Compares the specified object with this set for equality. Returns
|
isEmpty | back to summary |
---|---|
public boolean isEmpty() Overrides java. Implements java. Returns
|
iterator | back to summary |
---|---|
public Iterator Implements abstract java. Implements java. Returns an iterator over the elements contained in this set. The
iterator traverses the elements in their natural order (which is
the order in which the enum constants are declared). The returned
Iterator is a "weakly consistent" iterator that will never throw
|
recalculateSize | back to summary |
---|---|
private boolean recalculateSize() Recalculates the size of the set. Returns true if it's changed. |
remove | back to summary |
---|---|
public boolean remove(Object e) Overrides java. Implements java. Removes the specified element from this set if it is present.
|
removeAll | back to summary |
---|---|
public boolean removeAll(Collection<?> c) Overrides java. Implements java. Removes from this set all of its elements that are contained in the specified collection.
|
retainAll | back to summary |
---|---|
public boolean retainAll(Collection<?> c) Overrides java. Implements java. Retains only the elements in this set that are contained in the specified collection.
|
size | back to summary |
---|---|
public int size() Implements abstract java. Implements java. Returns the number of elements in this set.
|
Modifier and Type | Field and Description |
---|---|
pack-priv long | lastReturned
The bit representing the last element returned by this iterator but not removed, or zero if no such element exists. |
pack-priv int | lastReturnedIndex
The index corresponding to lastReturned in the elements array. |
pack-priv long | unseen
A bit vector representing the elements in the current "word" of the set not yet returned by this iterator. |
pack-priv int | unseenIndex
The index corresponding to unseen in the elements array. |
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
public boolean | |
public E | |
public void | remove()
Overrides default java. Removes from the underlying collection the last element returned by this iterator (optional operation). |
lastReturned | back to summary |
---|---|
pack-priv long lastReturned The bit representing the last element returned by this iterator but not removed, or zero if no such element exists. |
lastReturnedIndex | back to summary |
---|---|
pack-priv int lastReturnedIndex The index corresponding to lastReturned in the elements array. |
unseen | back to summary |
---|---|
pack-priv long unseen A bit vector representing the elements in the current "word" of the set not yet returned by this iterator. |
unseenIndex | back to summary |
---|---|
pack-priv int unseenIndex The index corresponding to unseen in the elements array. |
EnumSetIterator | back to summary |
---|---|
pack-priv EnumSetIterator() |
hasNext | back to summary |
---|---|
public boolean hasNext() Implements java. Doc from java. Returns
|
next | back to summary |
---|---|
public E next() Implements java. Doc from java. Returns the next element in the iteration.
|
remove | back to summary |
---|---|
public void remove() Overrides default java. Doc from java. Removes from the underlying collection the last element returned
by this iterator (optional operation). This method can be called
only once per call to The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.
The behavior of an iterator is unspecified if this method is called
after a call to the
|