Method Summary |
|
public boolean | add(E object) Adds the specified object to this TreeSet. |
public boolean | addAll(Collection<? extends E> collection) Adds the objects in the specified Collection to this TreeSet. |
public void | clear() Removes all elements from this TreeSet, leaving it empty. |
public Object | clone() Answers a new TreeSet with the same elements, size and comparator as this
TreeSet. |
public Comparator<? super E> | comparator() Answers the Comparator used to compare elements in this TreeSet. |
public boolean | contains(Object object) Searches this TreeSet for the specified object. |
public E | first() Answers the first element in this TreeSet. |
public SortedSet<E> | headSet(E end) Answers a SortedSet of the specified portion of this TreeSet which
contains elements less than the end element. |
public boolean | isEmpty() Answers if this TreeSet has no elements, a size of zero. |
public Iterator<E> | iterator() Answers an Iterator on the elements of this TreeSet. |
public E | last() Answers the last element in this TreeSet. |
public boolean | remove(Object object) Removes an occurrence of the specified object from this TreeSet. |
public int | size() Answers the number of elements in this TreeSet. |
public SortedSet<E> | subSet(E start, E end) Answers a SortedSet of the specified portion of this TreeSet which
contains elements greater or equal to the start element but less than the
end element. |
public SortedSet<E> | tailSet(E start) Answers a SortedSet of the specified portion of this TreeSet which
contains elements greater or equal to the start element. |