java.util

Class TreeSet<E>

public class TreeSet<E> extends AbstractSet<E> implements SortedSet<E>, Cloneable, Serializable

Constructor Summary
TreeSet()
TreeSet(Comparator<E> c)
<T extends E>TreeSet(Collection<T> c)
TreeSet(SortedSet<E> s)
Method Summary
booleanadd(E o)
<T extends E> booleanaddAll(Collection<T> c)
voidclear()
Objectclone()
Comparator<E>comparator()
booleancontains(Object o)
Efirst()
SortedSet<E>headSet(E toElement)
booleanisEmpty()
Iterator<E>iterator()
Elast()
booleanremove(Object o)
intsize()
SortedSet<E>subSet(E fromElement, E toElement)
SortedSet<E>tailSet(E fromElement)

Constructor Detail

TreeSet

public TreeSet()

TreeSet

public TreeSet(Comparator<E> c)

TreeSet

public <T extends E> TreeSet(Collection<T> c)

TreeSet

public TreeSet(SortedSet<E> s)

Method Detail

add

public boolean add(E o)

addAll

public <T extends E> boolean addAll(Collection<T> c)

clear

public void clear()

clone

public Object clone()

comparator

public Comparator<E> comparator()

contains

public boolean contains(Object o)

first

public E first()

headSet

public SortedSet<E> headSet(E toElement)

isEmpty

public boolean isEmpty()

iterator

public Iterator<E> iterator()

last

public E last()

remove

public boolean remove(Object o)

size

public int size()

subSet

public SortedSet<E> subSet(E fromElement, E toElement)

tailSet

public SortedSet<E> tailSet(E fromElement)