public class TreeSet<E> extends AbstractSet<E> implements NavigableSet<E>
| Constructor and Description |
|---|
TreeSet() |
TreeSet(Collection<? extends E> collection) |
TreeSet(Comparator<? super E> comparator) |
TreeSet(SortedSet<E> set) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E object) |
boolean |
addAll(Collection<? extends E> collection) |
E |
ceiling(E e) |
void |
clear() |
Comparator<? super E> |
comparator() |
boolean |
contains(Object object) |
Iterator<E> |
descendingIterator() |
NavigableSet<E> |
descendingSet() |
E |
first() |
E |
floor(E e) |
SortedSet<E> |
headSet(E end) |
NavigableSet<E> |
headSet(E end,
boolean endInclusive) |
E |
higher(E e) |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
E |
last() |
E |
lower(E e) |
E |
pollFirst() |
E |
pollLast() |
boolean |
remove(Object object) |
int |
size() |
NavigableSet<E> |
subSet(E start,
boolean startInclusive,
E end,
boolean endInclusive) |
SortedSet<E> |
subSet(E start,
E end) |
SortedSet<E> |
tailSet(E start) |
NavigableSet<E> |
tailSet(E start,
boolean startInclusive) |
equals, hashCode, removeAllcontainsAll, retainAll, toArray, toArray, toStringcontainsAll, equals, hashCode, removeAll, retainAll, toArray, toArrayremoveIfpublic TreeSet()
public TreeSet(Collection<? extends E> collection)
public TreeSet(Comparator<? super E> comparator)
public boolean add(E object)
add in interface Collection<E>add in interface Set<E>add in class AbstractCollection<E>public boolean addAll(Collection<? extends E> collection)
addAll in interface Collection<E>addAll in interface Set<E>addAll in class AbstractCollection<E>public void clear()
clear in interface Collection<E>clear in interface Set<E>clear in class AbstractCollection<E>public Comparator<? super E> comparator()
comparator in interface SortedSet<E>public boolean contains(Object object)
contains in interface Collection<E>contains in interface Set<E>contains in class AbstractCollection<E>public boolean isEmpty()
isEmpty in interface Collection<E>isEmpty in interface Set<E>isEmpty in class AbstractCollection<E>public Iterator<E> descendingIterator()
descendingIterator in interface NavigableSet<E>public boolean remove(Object object)
remove in interface Collection<E>remove in interface Set<E>remove in class AbstractCollection<E>public int size()
size in interface Collection<E>size in interface Set<E>size in class AbstractCollection<E>public E pollFirst()
pollFirst in interface NavigableSet<E>public E pollLast()
pollLast in interface NavigableSet<E>public E higher(E e)
higher in interface NavigableSet<E>public E lower(E e)
lower in interface NavigableSet<E>public E ceiling(E e)
ceiling in interface NavigableSet<E>public E floor(E e)
floor in interface NavigableSet<E>public NavigableSet<E> descendingSet()
descendingSet in interface NavigableSet<E>public NavigableSet<E> subSet(E start, boolean startInclusive, E end, boolean endInclusive)
subSet in interface NavigableSet<E>public NavigableSet<E> headSet(E end, boolean endInclusive)
headSet in interface NavigableSet<E>public NavigableSet<E> tailSet(E start, boolean startInclusive)
tailSet in interface NavigableSet<E>Copyright © 2026. All rights reserved.