@GwtIncompatible public final class SafeTreeSet<E> extends Object implements Serializable, NavigableSet<E>
TreeSet that aggressively checks to see if elements are mutually
comparable. This implementation passes the navigable set test suites.| Constructor and Description |
|---|
SafeTreeSet() |
SafeTreeSet(Collection<? extends E> collection) |
SafeTreeSet(Comparator<? super E> comparator) |
SafeTreeSet(SortedSet<E> set) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E element) |
boolean |
addAll(Collection<? extends E> collection) |
E |
ceiling(E e) |
void |
clear() |
Comparator<? super E> |
comparator() |
boolean |
contains(Object object) |
boolean |
containsAll(Collection<?> c) |
Iterator<E> |
descendingIterator() |
NavigableSet<E> |
descendingSet() |
boolean |
equals(Object obj) |
E |
first() |
E |
floor(E e) |
int |
hashCode() |
SortedSet<E> |
headSet(E toElement) |
NavigableSet<E> |
headSet(E toElement,
boolean inclusive) |
E |
higher(E e) |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
E |
last() |
E |
lower(E e) |
E |
pollFirst() |
E |
pollLast() |
boolean |
remove(Object object) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
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) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitspliteratorparallelStream, removeIf, streampublic SafeTreeSet()
public SafeTreeSet(Collection<? extends E> collection)
public SafeTreeSet(Comparator<? super E> comparator)
public SafeTreeSet(SortedSet<E> set)
public boolean addAll(Collection<? extends E> collection)
public void clear()
public Comparator<? super E> comparator()
comparator in interface SortedSet<E>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<E>containsAll in interface Set<E>public Iterator<E> descendingIterator()
descendingIterator in interface NavigableSet<E>public NavigableSet<E> descendingSet()
descendingSet in interface NavigableSet<E>public NavigableSet<E> headSet(E toElement, boolean inclusive)
headSet in interface NavigableSet<E>public boolean isEmpty()
public E pollFirst()
pollFirst in interface NavigableSet<E>public E pollLast()
pollLast in interface NavigableSet<E>public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public int size()
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>public <T> T[] toArray(T[] a)
public int hashCode()
Copyright © 2010–2019. All rights reserved.