E
- element type.public class TreeSet<E> extends AbstractSet<E> implements NavigableSet<E>, Serializable
Constructor and Description |
---|
TreeSet() |
TreeSet(Collection<? extends E> c) |
TreeSet(Comparator<? super E> c) |
TreeSet(SortedSet<E> s) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E o) |
E |
ceiling(E e) |
void |
clear() |
Comparator<? super E> |
comparator() |
boolean |
contains(Object o) |
Iterator<E> |
descendingIterator() |
NavigableSet<E> |
descendingSet() |
E |
first() |
E |
floor(E e) |
SortedSet<E> |
headSet(E toElement) |
NavigableSet<E> |
headSet(E toElement,
boolean inclusive) |
E |
higher(E e) |
Iterator<E> |
iterator() |
E |
last() |
E |
lower(E e) |
E |
pollFirst() |
E |
pollLast() |
boolean |
remove(Object o) |
int |
size() |
NavigableSet<E> |
subSet(E fromElement,
boolean fromInclusive,
E toElement,
boolean toInclusive) |
SortedSet<E> |
subSet(E fromElement,
E toElement) |
SortedSet<E> |
tailSet(E fromElement) |
NavigableSet<E> |
tailSet(E fromElement,
boolean inclusive) |
equals, hashCode, removeAll
addAll, containsAll, isEmpty, retainAll, toArray, toArray, toString
public TreeSet()
public TreeSet(Collection<? extends E> c)
public TreeSet(Comparator<? super E> c)
public boolean add(E o)
add
in interface Collection<E>
add
in interface Set<E>
add
in class AbstractCollection<E>
public E ceiling(E e)
ceiling
in interface NavigableSet<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 o)
contains
in interface Collection<E>
contains
in interface Set<E>
contains
in class AbstractCollection<E>
public Iterator<E> descendingIterator()
descendingIterator
in interface NavigableSet<E>
public NavigableSet<E> descendingSet()
descendingSet
in interface NavigableSet<E>
public E floor(E e)
floor
in interface NavigableSet<E>
public NavigableSet<E> headSet(E toElement, boolean inclusive)
headSet
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 pollFirst()
pollFirst
in interface NavigableSet<E>
public E pollLast()
pollLast
in interface NavigableSet<E>
public boolean remove(Object o)
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 NavigableSet<E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)
subSet
in interface NavigableSet<E>
public NavigableSet<E> tailSet(E fromElement, boolean inclusive)
tailSet
in interface NavigableSet<E>
Copyright © 2018. All rights reserved.