Class SafeTreeSet<E>
java.lang.Object
com.google.common.collect.testing.SafeTreeSet<E>
- All Implemented Interfaces:
Serializable,Iterable<E>,Collection<E>,NavigableSet<E>,SequencedCollection<E>,SequencedSet<E>,Set<E>,SortedSet<E>
@GwtIncompatible
public final class SafeTreeSet<E>
extends Object
implements Serializable, NavigableSet<E>
A wrapper around
TreeSet that aggressively checks to see if elements are mutually
comparable. This implementation passes the navigable set test suites.- Author:
- Louis Wasserman
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSafeTreeSet(Collection<? extends E> collection) SafeTreeSet(Comparator<? super E> comparator) SafeTreeSet(SortedSet<E> set) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends E> collection) @Nullable Evoidclear()Comparator<? super E> booleanbooleancontainsAll(Collection<?> c) booleanfirst()@Nullable EinthashCode()@Nullable EbooleanisEmpty()iterator()last()@Nullable E@Nullable E@Nullable EpollLast()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()Object[]toArray()<T> T[]toArray(T[] a) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.NavigableSet
removeFirst, removeLast, reversed
-
Constructor Details
-
SafeTreeSet
public SafeTreeSet() -
SafeTreeSet
-
SafeTreeSet
-
SafeTreeSet
-
-
Method Details
-
add
-
addAll
-
ceiling
-
clear
-
comparator
- Specified by:
comparatorin interfaceSortedSet<E>
-
contains
-
containsAll
- Specified by:
containsAllin interfaceCollection<E>- Specified by:
containsAllin interfaceSet<E>
-
descendingIterator
- Specified by:
descendingIteratorin interfaceNavigableSet<E>
-
descendingSet
- Specified by:
descendingSetin interfaceNavigableSet<E>
-
first
-
floor
-
headSet
-
headSet
- Specified by:
headSetin interfaceNavigableSet<E>
-
higher
-
isEmpty
-
iterator
-
last
-
lower
-
pollFirst
- Specified by:
pollFirstin interfaceNavigableSet<E>
-
pollLast
- Specified by:
pollLastin interfaceNavigableSet<E>
-
remove
-
removeAll
-
retainAll
-
size
-
subSet
public NavigableSet<E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive) - Specified by:
subSetin interfaceNavigableSet<E>
-
subSet
-
tailSet
-
tailSet
- Specified by:
tailSetin interfaceNavigableSet<E>
-
toArray
-
toArray
-
equals
-
hashCode
-
toString
-