|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Set<E>
Collection interface representing a group of unique elements.
| Nested Class Summary | |
|---|---|
static class |
Set.SetListenerList<E>
Set listener list. |
| Method Summary | |
|---|---|
boolean |
add(E element)
Adds an element to the group. |
void |
clear()
Removes all elements from the collection. |
int |
getCount()
Returns the number of elements in the set. |
ListenerList<SetListener<E>> |
getSetListeners()
Returns the set listener collection. |
boolean |
remove(E element)
Removes an element from the group. |
void |
setComparator(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 interface org.apache.pivot.collections.Group |
|---|
contains |
| Methods inherited from interface org.apache.pivot.collections.Collection |
|---|
getComparator, isEmpty |
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Method Detail |
|---|
boolean add(E element)
Group
add in interface Group<E>element - The element to add to the group.
SetListener.elementAdded(Set, Object)boolean remove(E element)
Group
remove in interface Group<E>element - The element to remove from the set.
SetListener.elementRemoved(Set, Object)void clear()
Collection
clear in interface Collection<E>SetListener.setCleared(Set)int getCount()
void setComparator(Comparator<E> comparator)
CollectionCalling this method more than once with the same comparator will re-sort the collection.
setComparator in interface Collection<E>comparator - The comparator used to order elements in the collection, or null if the
collection is unsorted.SetListener.setCleared(Set)ListenerList<SetListener<E>> getSetListeners()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||