Package tools.refinery.store.query.utils
Class OrderStatisticTree<T extends Comparable<? super T>>
java.lang.Object
tools.refinery.store.query.utils.OrderStatisticTree<T>
- Type Parameters:
T- the actual element type.
- All Implemented Interfaces:
Iterable<T>,Collection<T>,Set<T>
This class implements an order statistic tree which is based on AVL-trees.
This class was copied into Refinery from https://github.com/coderodde/OrderStatisticTree and is available under the MIT License. We also incorporated changes by Eugene Schava and cleaned up some linter warnings.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends T> c) voidclear()booleanbooleancontainsAll(Collection<?> c) get(int index) intbooleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()Object[]toArray()<U> U[]toArray(U[] a) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Set
equals, hashCode, spliterator
-
Constructor Details
-
OrderStatisticTree
public OrderStatisticTree()
-
-
Method Details
-
iterator
- Specified by:
iteratorin interfaceCollection<T extends Comparable<? super T>>- Specified by:
iteratorin interfaceIterable<T extends Comparable<? super T>>- Specified by:
iteratorin interfaceSet<T extends Comparable<? super T>>
-
toArray
- Specified by:
toArrayin interfaceCollection<T extends Comparable<? super T>>- Specified by:
toArrayin interfaceSet<T extends Comparable<? super T>>
-
toArray
public <U> U[] toArray(U[] a) - Specified by:
toArrayin interfaceCollection<T extends Comparable<? super T>>- Specified by:
toArrayin interfaceSet<T extends Comparable<? super T>>
-
containsAll
- Specified by:
containsAllin interfaceCollection<T extends Comparable<? super T>>- Specified by:
containsAllin interfaceSet<T extends Comparable<? super T>>
-
addAll
- Specified by:
addAllin interfaceCollection<T extends Comparable<? super T>>- Specified by:
addAllin interfaceSet<T extends Comparable<? super T>>
-
retainAll
- Specified by:
retainAllin interfaceCollection<T extends Comparable<? super T>>- Specified by:
retainAllin interfaceSet<T extends Comparable<? super T>>
-
removeAll
- Specified by:
removeAllin interfaceCollection<T extends Comparable<? super T>>- Specified by:
removeAllin interfaceSet<T extends Comparable<? super T>>
-
add
- Specified by:
addin interfaceCollection<T extends Comparable<? super T>>- Specified by:
addin interfaceSet<T extends Comparable<? super T>>
-
contains
- Specified by:
containsin interfaceCollection<T extends Comparable<? super T>>- Specified by:
containsin interfaceSet<T extends Comparable<? super T>>
-
remove
- Specified by:
removein interfaceCollection<T extends Comparable<? super T>>- Specified by:
removein interfaceSet<T extends Comparable<? super T>>
-
get
-
indexOf
-
size
public int size()- Specified by:
sizein interfaceCollection<T extends Comparable<? super T>>- Specified by:
sizein interfaceSet<T extends Comparable<? super T>>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<T extends Comparable<? super T>>- Specified by:
isEmptyin interfaceSet<T extends Comparable<? super T>>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<T extends Comparable<? super T>>- Specified by:
clearin interfaceSet<T extends Comparable<? super T>>
-