Package org.apache.cassandra.utils
Class InsertionOrderedNavigableSet<E>
java.lang.Object
org.apache.cassandra.utils.InsertionOrderedNavigableSet<E>
- Type Parameters:
E- the type of elements maintained by this set
- All Implemented Interfaces:
Iterable<E>,Collection<E>,NavigableSet<E>,Set<E>,SortedSet<E>
A
NavigableSet that enforces in-order insertion of elements. This is helpful when we
have an already-ordered collection with no duplicates and want constant time insertion.
Note: Not all methods of NavigableSet are implemented.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends E> c) voidclear()Comparator<? super E>booleanbooleancontainsAll(Collection<?> c) booleanfirst()inthashCode()booleanisEmpty()iterator()last()pollLast()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()Object[]toArray()<T> T[]toArray(T[] a) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.SortedSet
spliterator
-
Constructor Details
-
InsertionOrderedNavigableSet
-
-
Method Details
-
lower
- Specified by:
lowerin interfaceNavigableSet<E>
-
floor
- Specified by:
floorin interfaceNavigableSet<E>
-
ceiling
- Specified by:
ceilingin interfaceNavigableSet<E>
-
higher
- Specified by:
higherin interfaceNavigableSet<E>
-
pollFirst
- Specified by:
pollFirstin interfaceNavigableSet<E>
-
pollLast
- Specified by:
pollLastin interfaceNavigableSet<E>
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
iterator
-
toArray
-
toArray
public <T> T[] toArray(T[] a) -
add
-
remove
-
containsAll
- Specified by:
containsAllin interfaceCollection<E>- Specified by:
containsAllin interfaceSet<E>
-
addAll
-
retainAll
-
removeAll
-
clear
public void clear() -
descendingSet
- Specified by:
descendingSetin interfaceNavigableSet<E>
-
descendingIterator
- Specified by:
descendingIteratorin interfaceNavigableSet<E>
-
subSet
public NavigableSet<E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive) - Specified by:
subSetin interfaceNavigableSet<E>
-
headSet
- Specified by:
headSetin interfaceNavigableSet<E>
-
tailSet
- Specified by:
tailSetin interfaceNavigableSet<E>
-
comparator
- Specified by:
comparatorin interfaceSortedSet<E>
-
subSet
-
headSet
-
tailSet
-
first
-
last
-
equals
-
hashCode
public int hashCode()
-