|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SortedSet<T extends java.lang.Comparable<T>>
A Set that provides a total ordering on its elements. The elements are ordered using their natural ordering. All elements inserted into a sorted set must implement the Comparable interface. The set's iterator will traverse the set in ascending element order.
Method Summary | |
---|---|
boolean |
contains(T element)
Returns true if this set contains the specified element. |
T |
getMaximum()
Returns the maximal (highest) element in this set. |
T |
getMinimum()
Returns the minimal (lowest) element in this set. |
boolean |
isEmpty()
Returns true if this set contains no elements. |
SortedIterator<T> |
iterator()
Returns an iterator over the elements of this set. |
int |
size()
Returns the number of elements in this set (its cardinality). |
Method Detail |
---|
int size()
boolean contains(T element)
true
if this set contains the specified element.
true
if this set contains the specified elementboolean isEmpty()
true
if this set contains no elements.
true
if this set contains no elementsT getMinimum()
NoSuchElementException
- - if this set is emptyT getMaximum()
NoSuchElementException
- - if this set is emptySortedIterator<T> iterator()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |