@GwtIncompatible public final class SafeTreeSet<E> extends java.lang.Object implements java.io.Serializable, java.util.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(java.util.Collection<? extends E> collection) |
SafeTreeSet(java.util.Comparator<? super E> comparator) |
SafeTreeSet(java.util.SortedSet<E> set) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E element) |
boolean |
addAll(java.util.Collection<? extends E> collection) |
E |
ceiling(E e) |
void |
clear() |
java.util.Comparator<? super E> |
comparator() |
boolean |
contains(java.lang.Object object) |
boolean |
containsAll(java.util.Collection<?> c) |
java.util.Iterator<E> |
descendingIterator() |
java.util.NavigableSet<E> |
descendingSet() |
boolean |
equals(java.lang.Object obj) |
E |
first() |
E |
floor(E e) |
int |
hashCode() |
java.util.SortedSet<E> |
headSet(E toElement) |
java.util.NavigableSet<E> |
headSet(E toElement,
boolean inclusive) |
E |
higher(E e) |
boolean |
isEmpty() |
java.util.Iterator<E> |
iterator() |
E |
last() |
E |
lower(E e) |
E |
pollFirst() |
E |
pollLast() |
boolean |
remove(java.lang.Object object) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(java.util.Collection<?> c) |
int |
size() |
java.util.NavigableSet<E> |
subSet(E fromElement,
boolean fromInclusive,
E toElement,
boolean toInclusive) |
java.util.SortedSet<E> |
subSet(E fromElement,
E toElement) |
java.util.SortedSet<E> |
tailSet(E fromElement) |
java.util.NavigableSet<E> |
tailSet(E fromElement,
boolean inclusive) |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
java.lang.String |
toString() |
public SafeTreeSet()
public SafeTreeSet(java.util.Collection<? extends E> collection)
public SafeTreeSet(java.util.Comparator<? super E> comparator)
public SafeTreeSet(java.util.SortedSet<E> set)
public void clear()
public java.util.Comparator<? super E> comparator()
comparator
in interface java.util.SortedSet<E>
public boolean contains(java.lang.Object object)
public boolean containsAll(java.util.Collection<?> c)
public java.util.Iterator<E> descendingIterator()
descendingIterator
in interface java.util.NavigableSet<E>
public java.util.NavigableSet<E> descendingSet()
descendingSet
in interface java.util.NavigableSet<E>
public java.util.NavigableSet<E> headSet(E toElement, boolean inclusive)
headSet
in interface java.util.NavigableSet<E>
public boolean isEmpty()
public boolean remove(java.lang.Object object)
public boolean removeAll(java.util.Collection<?> c)
public boolean retainAll(java.util.Collection<?> c)
public int size()
public java.util.NavigableSet<E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)
subSet
in interface java.util.NavigableSet<E>
public java.util.NavigableSet<E> tailSet(E fromElement, boolean inclusive)
tailSet
in interface java.util.NavigableSet<E>
public java.lang.Object[] toArray()
public <T> T[] toArray(T[] a)
public boolean equals(java.lang.Object obj)
public int hashCode()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2010-2018. All Rights Reserved.