edu.emory.mathcs.backport.java.util

Class TreeSet

Implemented Interfaces:
Cloneable, NavigableSet, Serializable, SortedSet

public class TreeSet
extends AbstractSet
implements NavigableSet, Cloneable, Serializable

Constructor Summary

TreeSet()
TreeSet(Collection c)
TreeSet(Comparator comparator)
TreeSet(SortedSet s)

Method Summary

boolean
add(Object o)
boolean
addAll(Collection c)
Object
ceiling(Object e)
void
clear()
Object
clone()
Comparator
comparator()
boolean
contains(Object o)
Iterator
descendingIterator()
NavigableSet
descendingSet()
Object
first()
Object
floor(Object e)
SortedSet
headSet(Object toElement)
NavigableSet
headSet(Object toElement, boolean toInclusive)
Object
higher(Object e)
boolean
isEmpty()
Iterator
iterator()
Object
last()
Object
lower(Object e)
Object
pollFirst()
Object
pollLast()
boolean
remove(Object o)
int
size()
SortedSet
subSet(Object fromElement, Object toElement)
NavigableSet
subSet(Object fromElement, boolean fromInclusive, Object toElement, boolean toInclusive)
SortedSet
tailSet(Object fromElement)
NavigableSet
tailSet(Object fromElement, boolean fromInclusive)
Object[]
toArray()
Object[]
toArray(Object[] a)

Constructor Details

TreeSet

public TreeSet()

TreeSet

public TreeSet(Collection c)

TreeSet

public TreeSet(Comparator comparator)

TreeSet

public TreeSet(SortedSet s)

Method Details

add

public boolean add(Object o)

addAll

public boolean addAll(Collection c)

ceiling

public Object ceiling(Object e)
Specified by:
ceiling in interface NavigableSet

clear

public void clear()

clone

public Object clone()

comparator

public Comparator comparator()

contains

public boolean contains(Object o)

descendingIterator

public Iterator descendingIterator()
Specified by:
descendingIterator in interface NavigableSet

descendingSet

public NavigableSet descendingSet()
Specified by:
descendingSet in interface NavigableSet

first

public Object first()

floor

public Object floor(Object e)
Specified by:
floor in interface NavigableSet

headSet

public SortedSet headSet(Object toElement)
Specified by:
headSet in interface NavigableSet

headSet

public NavigableSet headSet(Object toElement,
                            boolean toInclusive)
Specified by:
headSet in interface NavigableSet

higher

public Object higher(Object e)
Specified by:
higher in interface NavigableSet

isEmpty

public boolean isEmpty()

iterator

public Iterator iterator()
Specified by:
iterator in interface NavigableSet

last

public Object last()

lower

public Object lower(Object e)
Specified by:
lower in interface NavigableSet

pollFirst

public Object pollFirst()
Specified by:
pollFirst in interface NavigableSet

pollLast

public Object pollLast()
Specified by:
pollLast in interface NavigableSet

remove

public boolean remove(Object o)

size

public int size()

subSet

public SortedSet subSet(Object fromElement,
                        Object toElement)
Specified by:
subSet in interface NavigableSet

subSet

public NavigableSet subSet(Object fromElement,
                           boolean fromInclusive,
                           Object toElement,
                           boolean toInclusive)
Specified by:
subSet in interface NavigableSet

tailSet

public SortedSet tailSet(Object fromElement)
Specified by:
tailSet in interface NavigableSet

tailSet

public NavigableSet tailSet(Object fromElement,
                            boolean fromInclusive)
Specified by:
tailSet in interface NavigableSet

toArray

public Object[] toArray()

toArray

public Object[] toArray(Object[] a)