Package org.apache.cassandra.utils.btree
Class BTreeSet<V>
java.lang.Object
org.apache.cassandra.utils.btree.BTreeSet<V>
- All Implemented Interfaces:
Iterable<V>,Collection<V>,List<V>,NavigableSet<V>,Set<V>,SortedSet<V>
- Direct Known Subclasses:
BTreeSet.BTreeRange
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection<? extends V> c) booleanaddAll(Collection<? extends V> c) static <V> BTreeSet.Builder<V>builder(Comparator<? super V> comparator) static <V> BTreeSet.Builder<V>builder(Comparator<? super V> comparator, int initialCapacity) if you know the precise size of the resultant set useperfectBuilderinstead.voidclear()Comparator<? super V>booleanbooleancontainsAll(Collection<?> c) static <V> BTreeSet<V>copy(SortedSet<? extends V> copy, Comparator<? super V> comparator) static <V> BTreeSet<V>copy(SortedSet<? extends V> copy, Comparator<? super V> comparator, Function<V, V> modifier) static <V> BTreeSet<V>empty(Comparator<? super V> comparator) first()get(int index) The converse of indexOf: provided an index between 0 and size, returns the i'th item, in set order.inthashCode()intThe index of the item within the list, or its insertion point otherwise.booleanisEmpty()iterator()last()intlistIterator(int index) static <V extends Comparable<V>>
BTreeSet<V>of(Collection<V> sortedValues) static <V> BTreeSet<V>of(Comparator<? super V> comparator, V value) static <V extends Comparable<V>>
BTreeSet<V>of(V value) pollLast()remove(int index) booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()protected BTreeSearchIterator<V,V> subList(int fromIndex, int toIndex) Object[]toArray()<T> T[]toArray(T[] a) <T> T[]toArray(T[] a, int offset) Object[]tree()static <V> BTreeSet<V>wrap(Object[] btree, Comparator<? super V> comparator) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
equals, replaceAll, sort
-
Field Details
-
comparator
-
tree
-
-
Constructor Details
-
BTreeSet
-
-
Method Details
-
comparator
- Specified by:
comparatorin interfaceSortedSet<V>
-
slice
-
tree
-
indexOf
The index of the item within the list, or its insertion point otherwise. i.e. binarySearch semantics -
get
The converse of indexOf: provided an index between 0 and size, returns the i'th item, in set order. -
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<V>
-
subList
-
size
public int size() -
isEmpty
public boolean isEmpty() -
iterator
-
descendingIterator
- Specified by:
descendingIteratorin interfaceNavigableSet<V>
-
toArray
-
toArray
public <T> T[] toArray(T[] a) -
toArray
public <T> T[] toArray(T[] a, int offset) -
spliterator
- Specified by:
spliteratorin interfaceCollection<V>- Specified by:
spliteratorin interfaceIterable<V>- Specified by:
spliteratorin interfaceList<V>- Specified by:
spliteratorin interfaceSet<V>- Specified by:
spliteratorin interfaceSortedSet<V>
-
subSet
- Specified by:
subSetin interfaceNavigableSet<V>
-
headSet
- Specified by:
headSetin interfaceNavigableSet<V>
-
tailSet
- Specified by:
tailSetin interfaceNavigableSet<V>
-
subSet
-
headSet
-
tailSet
-
descendingSet
- Specified by:
descendingSetin interfaceNavigableSet<V>
-
first
-
last
-
lower
- Specified by:
lowerin interfaceNavigableSet<V>
-
floor
- Specified by:
floorin interfaceNavigableSet<V>
-
ceiling
- Specified by:
ceilingin interfaceNavigableSet<V>
-
higher
- Specified by:
higherin interfaceNavigableSet<V>
-
contains
-
containsAll
- Specified by:
containsAllin interfaceCollection<V>- Specified by:
containsAllin interfaceList<V>- Specified by:
containsAllin interfaceSet<V>
-
hashCode
public int hashCode() -
addAll
-
addAll
-
retainAll
-
removeAll
-
clear
public void clear() -
pollFirst
- Specified by:
pollFirstin interfaceNavigableSet<V>
-
pollLast
- Specified by:
pollLastin interfaceNavigableSet<V>
-
add
-
remove
-
set
-
add
-
remove
-
listIterator
- Specified by:
listIteratorin interfaceList<V>
-
listIterator
- Specified by:
listIteratorin interfaceList<V>
-
builder
-
builder
public static <V> BTreeSet.Builder<V> builder(Comparator<? super V> comparator, int initialCapacity) if you know the precise size of the resultant set useperfectBuilderinstead. -
wrap
-
of
-
of
-
empty
-
of
-
copy
-
copy
public static <V> BTreeSet<V> copy(SortedSet<? extends V> copy, Comparator<? super V> comparator, Function<V, V> modifier)
-