Package java.util
Class TreeSet
- java.lang.Object
-
- java.util.AbstractCollection
-
- java.util.AbstractSet
-
- java.util.TreeSet
-
- All Implemented Interfaces:
Serializable,Cloneable,Collection,Set,SortedSet
public class TreeSet extends AbstractSet implements SortedSet, Cloneable, Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TreeSet()TreeSet(Collection var0)TreeSet(Comparator var0)TreeSet(SortedSet var0)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(Object var0)booleanaddAll(Collection var0)voidclear()Objectclone()Comparatorcomparator()booleancontains(Object var0)Objectfirst()SortedSetheadSet(Object var0)booleanisEmpty()Iteratoriterator()Objectlast()booleanremove(Object var0)intsize()SortedSetsubSet(Object var0, Object var1)SortedSettailSet(Object var0)-
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
-
Methods inherited from class java.util.AbstractCollection
containsAll, retainAll, toArray, toArray, toString
-
-
-
-
Constructor Detail
-
TreeSet
public TreeSet()
-
TreeSet
public TreeSet(Collection var0)
-
TreeSet
public TreeSet(Comparator var0)
-
TreeSet
public TreeSet(SortedSet var0)
-
-
Method Detail
-
add
public boolean add(Object var0)
- Specified by:
addin interfaceCollection- Specified by:
addin interfaceSet- Overrides:
addin classAbstractCollection
-
addAll
public boolean addAll(Collection var0)
- Specified by:
addAllin interfaceCollection- Specified by:
addAllin interfaceSet- Overrides:
addAllin classAbstractCollection
-
clear
public void clear()
- Specified by:
clearin interfaceCollection- Specified by:
clearin interfaceSet- Overrides:
clearin classAbstractCollection
-
comparator
public Comparator comparator()
- Specified by:
comparatorin interfaceSortedSet
-
contains
public boolean contains(Object var0)
- Specified by:
containsin interfaceCollection- Specified by:
containsin interfaceSet- Overrides:
containsin classAbstractCollection
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection- Specified by:
isEmptyin interfaceSet- Overrides:
isEmptyin classAbstractCollection
-
iterator
public Iterator iterator()
- Specified by:
iteratorin interfaceCollection- Specified by:
iteratorin interfaceSet- Specified by:
iteratorin classAbstractCollection
-
remove
public boolean remove(Object var0)
- Specified by:
removein interfaceCollection- Specified by:
removein interfaceSet- Overrides:
removein classAbstractCollection
-
size
public int size()
- Specified by:
sizein interfaceCollection- Specified by:
sizein interfaceSet- Specified by:
sizein classAbstractCollection
-
-