|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Collection<T>
Root interface in collection hierarchy. Defines operations common to all collections.
Method Summary | |
---|---|
void |
clear()
Removes all elements from the collection. |
Comparator<T> |
getComparator()
Returns the collection's sort order. |
boolean |
isEmpty()
Tests the emptiness of the collection. |
void |
setComparator(Comparator<T> 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 java.lang.Iterable |
---|
iterator |
Method Detail |
---|
void clear()
boolean isEmpty()
Comparator<T> getComparator()
setComparator(Comparator)
void setComparator(Comparator<T> comparator)
Calling this method more than once with the same comparator will re-sort the collection.
comparator
- The comparator used to order elements in the collection, or null if the
collection is unsorted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |