|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractSet
edu.emory.mathcs.backport.java.util.TreeSet
| Constructor Summary | |
TreeSet()
|
|
TreeSet(java.util.Collection c)
|
|
TreeSet(java.util.Comparator comparator)
|
|
TreeSet(java.util.SortedSet s)
|
|
| Method Summary | |
boolean |
add(java.lang.Object o)
|
boolean |
addAll(java.util.Collection c)
|
java.lang.Object |
ceiling(java.lang.Object e)
Returns the least element in this set greater than or equal to the given element, or if there is no such element. |
void |
clear()
|
java.lang.Object |
clone()
|
java.util.Comparator |
comparator()
|
boolean |
contains(java.lang.Object o)
|
java.util.Iterator |
descendingIterator()
Returns an iterator over the elements in this set, in descending order. |
NavigableSet |
descendingSet()
Returns a reverse order view of the elements contained in this set. |
java.lang.Object |
first()
|
java.lang.Object |
floor(java.lang.Object e)
Returns the greatest element in this set less than or equal to the given element, or if there is no such element. |
java.util.SortedSet |
headSet(java.lang.Object toElement)
Equivalent to . |
NavigableSet |
headSet(java.lang.Object toElement,
boolean toInclusive)
Returns a view of the portion of this set whose elements are less than (or equal to, if is true) . |
java.lang.Object |
higher(java.lang.Object e)
Returns the least element in this set strictly greater than the given element, or if there is no such element. |
boolean |
isEmpty()
|
java.util.Iterator |
iterator()
Returns an iterator over the elements in this set, in ascending order. |
java.lang.Object |
last()
|
java.lang.Object |
lower(java.lang.Object e)
Returns the greatest element in this set strictly less than the given element, or if there is no such element. |
java.lang.Object |
pollFirst()
Retrieves and removes the first (lowest) element, or returns if this set is empty. |
java.lang.Object |
pollLast()
Retrieves and removes the last (highest) element, or returns if this set is empty. |
boolean |
remove(java.lang.Object o)
|
int |
size()
|
NavigableSet |
subSet(java.lang.Object fromElement,
boolean fromInclusive,
java.lang.Object toElement,
boolean toInclusive)
Returns a view of the portion of this set whose elements range from to . |
java.util.SortedSet |
subSet(java.lang.Object fromElement,
java.lang.Object toElement)
Equivalent to . |
java.util.SortedSet |
tailSet(java.lang.Object fromElement)
Equivalent to . |
NavigableSet |
tailSet(java.lang.Object fromElement,
boolean fromInclusive)
Returns a view of the portion of this set whose elements are greater than (or equal to, if is true) . |
java.lang.Object[] |
toArray()
|
java.lang.Object[] |
toArray(java.lang.Object[] a)
|
| Methods inherited from class java.util.AbstractSet |
equals, hashCode, removeAll |
| Methods inherited from class java.util.AbstractCollection |
containsAll, retainAll, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Set |
containsAll, equals, hashCode, removeAll, retainAll |
| Constructor Detail |
public TreeSet()
public TreeSet(java.util.Comparator comparator)
public TreeSet(java.util.Collection c)
public TreeSet(java.util.SortedSet s)
| Method Detail |
public java.lang.Object lower(java.lang.Object e)
NavigableSet
lower in interface NavigableSete - the value to match
public java.lang.Object floor(java.lang.Object e)
NavigableSet
floor in interface NavigableSete - the value to match
public java.lang.Object ceiling(java.lang.Object e)
NavigableSet
ceiling in interface NavigableSete - the value to match
public java.lang.Object higher(java.lang.Object e)
NavigableSet
higher in interface NavigableSete - the value to match
public java.lang.Object pollFirst()
NavigableSet
pollFirst in interface NavigableSetpublic java.lang.Object pollLast()
NavigableSet
pollLast in interface NavigableSetpublic java.util.Iterator iterator()
NavigableSet
iterator in interface NavigableSetpublic java.util.Iterator descendingIterator()
NavigableSet
descendingIterator in interface NavigableSet
public java.util.SortedSet subSet(java.lang.Object fromElement,
java.lang.Object toElement)
NavigableSetEquivalent to .
subSet in interface NavigableSetpublic java.util.SortedSet headSet(java.lang.Object toElement)
NavigableSetEquivalent to .
headSet in interface NavigableSetpublic java.util.SortedSet tailSet(java.lang.Object fromElement)
NavigableSetEquivalent to .
tailSet in interface NavigableSet
public NavigableSet subSet(java.lang.Object fromElement,
boolean fromInclusive,
java.lang.Object toElement,
boolean toInclusive)
NavigableSetThe returned set will throw an on an attempt to insert an element outside its range.
subSet in interface NavigableSetfromElement - low endpoint of the returned setfromInclusive - if the low endpoint
is to be included in the returned viewtoElement - high endpoint of the returned settoInclusive - if the high endpoint
is to be included in the returned view
public NavigableSet headSet(java.lang.Object toElement,
boolean toInclusive)
NavigableSetThe returned set will throw an on an attempt to insert an element outside its range.
headSet in interface NavigableSettoElement - high endpoint of the returned settoInclusive - if the high endpoint
is to be included in the returned view
public NavigableSet tailSet(java.lang.Object fromElement,
boolean fromInclusive)
NavigableSetThe returned set will throw an on an attempt to insert an element outside its range.
tailSet in interface NavigableSetfromElement - low endpoint of the returned setfromInclusive - if the low endpoint
is to be included in the returned view
public NavigableSet descendingSet()
NavigableSetThe returned set has an ordering equivalent to
Collections.reverseOrder(comparator()).
The expression returns a
view of essentially equivalent to .
descendingSet in interface NavigableSetpublic java.util.Comparator comparator()
comparator in interface java.util.SortedSetpublic java.lang.Object first()
first in interface java.util.SortedSetpublic java.lang.Object last()
last in interface java.util.SortedSetpublic int size()
size in interface java.util.Setpublic boolean isEmpty()
isEmpty in interface java.util.Setpublic boolean contains(java.lang.Object o)
contains in interface java.util.Setpublic java.lang.Object[] toArray()
toArray in interface java.util.Setpublic java.lang.Object[] toArray(java.lang.Object[] a)
toArray in interface java.util.Setpublic boolean add(java.lang.Object o)
add in interface java.util.Setpublic boolean remove(java.lang.Object o)
remove in interface java.util.Setpublic boolean addAll(java.util.Collection c)
addAll in interface java.util.Setpublic void clear()
clear in interface java.util.Setpublic java.lang.Object clone()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||