|
|||||||||
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)
Return true if this set contains the specified element. |
T |
getMaximum()
Return the maximal (highest) element in this set. |
T |
getMinimum()
Return the minimal (lowest) element in this set. |
boolean |
isEmpty()
Return true if this set contains no elements. |
SortedIterator<T> |
iterator()
Return an iterator over the elements of this set. |
int |
size()
Return the number of elements in this set (its cardinality). |
Method Detail |
---|
boolean contains(T element)
true
if this set contains the specified element.
true
if this set contains the specified elementT getMaximum()
NoSuchElementException
- - if this set is emptyT getMinimum()
NoSuchElementException
- - if this set is emptyboolean isEmpty()
true
if this set contains no elements.
true
if this set contains no elementsSortedIterator<T> iterator()
int size()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |