|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpivot.collections.EnumSet<E>
public class EnumSet<E extends java.lang.Enum<E>>
Implementation of the Set
interface that is backed by a bitfield
representing enum values. Enum values are mapped to the bitfield by their
ordinal value.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface pivot.collections.Set |
---|
Set.SetListenerList<E> |
Constructor Summary | |
---|---|
EnumSet()
|
Method Summary | |
---|---|
void |
add(E element)
Adds an element to the group. |
void |
clear()
Removes all elements from the collection. |
boolean |
contains(E element)
Tests the existence of an element in the group. |
java.util.Comparator<E> |
getComparator()
Returns the collection's sort order. |
ListenerList<SetListener<E>> |
getSetListeners()
Returns the set listener collection. |
boolean |
isEmpty()
Tests the emptiness of the group. |
java.util.Iterator<E> |
iterator()
|
void |
remove(E element)
Removes an element from the group. |
void |
setComparator(java.util.Comparator<E> comparator)
Sets the collection's sort order, re-ordering the collection's contents and ensuring that new entries preserve the sort order. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EnumSet()
Method Detail |
---|
public void add(E element)
Group
add
in interface Group<E extends java.lang.Enum<E>>
add
in interface Set<E extends java.lang.Enum<E>>
element
- The element to add to the group.SetListener.elementAdded(Set, Object)
public void remove(E element)
Group
remove
in interface Group<E extends java.lang.Enum<E>>
remove
in interface Set<E extends java.lang.Enum<E>>
element
- The element to remove from the set.SetListener.elementRemoved(Set, Object)
public void clear()
Collection
clear
in interface Collection<E extends java.lang.Enum<E>>
clear
in interface Set<E extends java.lang.Enum<E>>
SetListener.setCleared(Set)
public boolean contains(E element)
Group
contains
in interface Group<E extends java.lang.Enum<E>>
element
- The element whose presence in the group is to be tested.
public boolean isEmpty()
Group
isEmpty
in interface Group<E extends java.lang.Enum<E>>
public ListenerList<SetListener<E>> getSetListeners()
Set
getSetListeners
in interface Set<E extends java.lang.Enum<E>>
public java.util.Comparator<E> getComparator()
Collection
getComparator
in interface Collection<E extends java.lang.Enum<E>>
Collection.setComparator(Comparator)
public void setComparator(java.util.Comparator<E> comparator)
Collection
setComparator
in interface Collection<E extends java.lang.Enum<E>>
setComparator
in interface Set<E extends java.lang.Enum<E>>
comparator
- The comparator used to order elements in the collection, or null if the
collection is unsorted.SetListener.setCleared(Set)
public java.util.Iterator<E> iterator()
iterator
in interface java.lang.Iterable<E extends java.lang.Enum<E>>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |