@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() |
public SafeTreeSet()
public SafeTreeSet(Collection<? extends E> collection)
public SafeTreeSet(Comparator<? super E> comparator)
public boolean add(E element)
public boolean addAll(Collection<? extends E> collection)
public E ceiling(E e)
ceiling
in interface NavigableSet<E>
public void clear()
public Comparator<? super E> comparator()
comparator
in interface SortedSet<E>
public boolean contains(Object object)
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 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 boolean isEmpty()
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 object)
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 Object[] toArray()
public <T> T[] toArray(T[] a)
public boolean equals(Object obj)
public int hashCode()
Copyright © 2010-2016. All Rights Reserved.