public class AVLSearch<Q> extends Object implements BiTreeSet<Q>
| Constructor and Description |
|---|
AVLSearch(Comparator<Q> comparator) |
AVLSearch(Comparator<Q> comparator,
AVLNode<Q> root) |
AVLSearch(Comparator<Q> comparator,
Q data) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_removeFamily(AVLNode<Q> node) |
boolean |
add(Q data) |
boolean |
addAll(Collection<? extends Q> collection) |
void |
clear() |
protected List<Q> |
collect(AVLNode<Q> src,
List<Q> list) |
Comparator<? super Q> |
comparator() |
protected boolean |
contains(AVLNode<Q> src,
Q data) |
boolean |
contains(Object object) |
boolean |
containsAll(Collection<?> collection) |
boolean |
containsAllFamily(Collection<Q> collection) |
protected boolean |
containsFamily(AVLNode<Q> src,
Q data) |
boolean |
containsFamily(Q object) |
protected boolean |
eq(AVLNode<Q> src,
AVLNode<Q> tar) |
protected boolean |
eq(Q data,
AVLNode<Q> src) |
protected boolean |
eq(Q data0,
Q data1) |
Q |
first() |
Iterator<Q> |
firstFamily() |
void |
forEach(java.util.function.Consumer<? super Q> action) |
Comparator<Q> |
getComparator() |
AVLNode<Q> |
getRoot() |
protected boolean |
gt(AVLNode<Q> src,
AVLNode<Q> tar) |
protected boolean |
gt(Q data,
AVLNode<Q> src) |
protected boolean |
gt(Q data0,
Q data1) |
protected AVLNode<Q> |
headSet(AVLNode<Q> src,
Q item) |
SortedSet<Q> |
headSet(Q toElement) |
protected int |
height(AVLNode<Q> node) |
boolean |
isEmpty() |
Iterator<Q> |
iterator() |
Q |
last() |
Iterator<Q> |
lastFamily() |
protected boolean |
le(AVLNode<Q> src) |
protected boolean |
lf(AVLNode<Q> src) |
protected Q |
maximum(AVLNode<Q> src) |
protected AVLNode<Q> |
maximumFamily(AVLNode<Q> src) |
protected Q |
minimum(AVLNode<Q> src) |
protected AVLNode<Q> |
minimumFamily(AVLNode<Q> src) |
java.util.stream.Stream<Q> |
parallelStream() |
protected boolean |
re(AVLNode<Q> src) |
protected void |
rebalance(AVLNode<Q> node) |
protected void |
reheight(AVLNode<Q> node) |
boolean |
remove(Object object) |
boolean |
removeAll(Collection<?> collection) |
void |
removeAllFamily(Collection<? extends Q> collection) |
void |
removeFamily(Q object) |
boolean |
removeIf(java.util.function.Predicate<? super Q> filter) |
boolean |
retainAll(Collection<?> collection) |
protected AVLNode<Q> |
rotateLeft(AVLNode<Q> node) |
protected AVLNode<Q> |
rotateLeftThenRight(AVLNode<Q> node) |
protected AVLNode<Q> |
rotateRight(AVLNode<Q> node) |
protected AVLNode<Q> |
rotateRightThenLeft(AVLNode<Q> node) |
protected void |
setBalance(Collection<AVLNode<Q>> nodes) |
void |
setRoot(AVLNode<Q> root) |
int |
size() |
protected int |
size(AVLNode<Q> src) |
Spliterator<Q> |
spliterator() |
protected boolean |
st(AVLNode<Q> src,
AVLNode<Q> tar) |
protected boolean |
st(Q data,
AVLNode<Q> src) |
protected boolean |
st(Q data0,
Q data1) |
java.util.stream.Stream<Q> |
stream() |
protected AVLNode<Q> |
subSet(AVLNode<Q> src,
Q from,
Q to) |
SortedSet<Q> |
subSet(Q fromElement,
Q toElement) |
protected AVLNode<Q> |
tailSet(AVLNode<Q> src,
Q item) |
SortedSet<Q> |
tailSet(Q fromElement) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
public AVLSearch(Comparator<Q> comparator)
comparator - public AVLSearch(Comparator<Q> comparator, AVLNode<Q> root)
comparator - root - public AVLSearch(Comparator<Q> comparator, Q data)
comparator - data - public boolean add(Q data)
public boolean addAll(Collection<? extends Q> collection)
public boolean contains(Object object)
public boolean containsAll(Collection<?> collection)
containsAll in interface Collection<Q>containsAll in interface Set<Q>containsAll in interface BiTreeSet<Q>protected boolean containsFamily(AVLNode<Q> src, Q data)
src - data - public boolean containsFamily(Q object)
containsFamily in interface BiTreeSet<Q>public boolean containsAllFamily(Collection<Q> collection)
containsAllFamily in interface BiTreeSet<Q>public void removeFamily(Q object)
removeFamily in interface BiTreeSet<Q>data - public void removeAllFamily(Collection<? extends Q> collection)
removeAllFamily in interface BiTreeSet<Q>public boolean removeIf(java.util.function.Predicate<? super Q> filter)
public boolean remove(Object object)
public boolean removeAll(Collection<?> collection)
protected AVLNode<Q> rotateLeftThenRight(AVLNode<Q> node)
node - protected AVLNode<Q> rotateRightThenLeft(AVLNode<Q> node)
node - protected Q maximum(AVLNode<Q> src)
src - sourcepublic Q last()
public Q first()
protected AVLNode<Q> minimumFamily(AVLNode<Q> src)
src - sourceprotected AVLNode<Q> maximumFamily(AVLNode<Q> src)
src - sourcepublic Iterator<Q> lastFamily()
lastFamily in interface BiTreeSet<Q>public Iterator<Q> firstFamily()
firstFamily in interface BiTreeSet<Q>protected AVLNode<Q> subSet(AVLNode<Q> src, Q from, Q to)
src - from - to - public int size()
public Spliterator<Q> spliterator()
spliterator in interface Iterable<Q>spliterator in interface Collection<Q>spliterator in interface Set<Q>spliterator in interface SortedSet<Q>spliterator in interface BiTreeSet<Q>public Comparator<? super Q> comparator()
comparator in interface SortedSet<Q>comparator in interface BiTreeSet<Q>public void clear()
public boolean retainAll(Collection<?> collection)
public <T> T[] toArray(T[] a)
public Object[] toArray()
public boolean isEmpty()
public java.util.stream.Stream<Q> parallelStream()
parallelStream in interface Collection<Q>parallelStream in interface BiTreeSet<Q>public java.util.stream.Stream<Q> stream()
public void forEach(java.util.function.Consumer<? super Q> action)
protected void setBalance(Collection<AVLNode<Q>> nodes)
nodes - protected boolean eq(AVLNode<Q> src, AVLNode<Q> tar)
data - comparable objectsrc - sourceprotected boolean eq(Q data, AVLNode<Q> src)
data - comparable objectsrc - sourceprotected boolean eq(Q data0, Q data1)
data - comparable objectsrc - sourceprotected boolean st(AVLNode<Q> src, AVLNode<Q> tar)
data - comparable objectsrc - sourceprotected boolean st(Q data, AVLNode<Q> src)
data - comparable objectsrc - sourceprotected boolean st(Q data0, Q data1)
data - comparable objectsrc - sourceprotected boolean gt(AVLNode<Q> src, AVLNode<Q> tar)
data - comparable objectsrc - sourceprotected boolean gt(Q data, AVLNode<Q> src)
data - comparable objectsrc - sourceprotected boolean gt(Q data0, Q data1)
data - comparable objectsrc - sourceprotected boolean le(AVLNode<Q> src)
src - sourceprotected boolean re(AVLNode<Q> src)
src - sourceprotected boolean lf(AVLNode<Q> src)
src - sourcepublic Comparator<Q> getComparator()
Copyright © 2018 Terra Software Informatics LLC.. All rights reserved.