public class BiSearch<Q> extends Object implements BiTreeSet<Q>, Serializable
| Constructor and Description |
|---|
BiSearch(Comparator<Q> comparator,
BiNode<Q> root) |
BiSearch(Comparator<Q> comp,
Q item) |
| Modifier and Type | Method and Description |
|---|---|
protected BiNode<Q> |
add(BiNode<Q> src,
Q item) |
boolean |
add(Q item) |
boolean |
addAll(Collection<? extends Q> collection) |
protected boolean |
btw(Q from,
Q to,
BiNode<Q> src) |
void |
clear() |
protected List<Q> |
collect(BiNode<Q> src,
List<Q> list) |
Comparator<? super Q> |
comparator() |
boolean |
contains(Object item) |
boolean |
containsAll(Collection<?> collection) |
boolean |
containsAllFamily(Collection<Q> collection) |
boolean |
containsFamily(Q item) |
protected boolean |
eq(Q data,
BiNode<Q> src) |
protected int |
familySize(BiNode<Q> src) |
Q |
first() |
Iterator<Q> |
firstFamily() |
void |
forEach(java.util.function.Consumer<? super Q> action) |
protected BiNode<Q> |
get(BiNode<Q> src,
Q item) |
protected BiNode<Q> |
getFamily(BiNode<Q> src,
Q item) |
BiNode<Q> |
getRoot()
Basic getter method.
|
protected boolean |
gt(Q data,
BiNode<Q> src) |
protected boolean |
hasDuplicates(BiNode<Q> src) |
protected BiNode<Q> |
headSet(BiNode<Q> src,
Q item) |
BiTreeSet<Q> |
headSet(Q toElement) |
protected int |
height(BiNode<Q> src) |
boolean |
isEmpty() |
Iterator<Q> |
iterator() |
Q |
last() |
Iterator<Q> |
lastFamily() |
protected boolean |
le(BiNode<Q> src) |
protected boolean |
lf(BiNode<Q> src) |
protected Q |
maximum(BiNode<Q> src) |
protected BiNode<Q> |
maximumFamily(BiNode<Q> src) |
protected Q |
minimum(BiNode<Q> src) |
protected BiNode<Q> |
minimumFamily(BiNode<Q> src) |
java.util.stream.Stream<Q> |
parallelStream() |
protected boolean |
re(BiNode<Q> src) |
boolean |
remove(Object item) |
boolean |
removeAll(Collection<?> collection) |
void |
removeAllFamily(Collection<? extends Q> collection) |
protected BiNode<Q> |
removeFamily(BiNode<Q> src,
Q item) |
void |
removeFamily(Q item) |
boolean |
removeIf(java.util.function.Predicate<? super Q> filter) |
boolean |
retainAll(Collection<?> collection) |
void |
setRoot(BiNode<Q> obj)
Basic setter method.
|
int |
size() |
protected int |
size(BiNode<Q> src) |
Spliterator<Q> |
spliterator() |
protected boolean |
st(Q data,
BiNode<Q> src) |
java.util.stream.Stream<Q> |
stream() |
protected BiNode<Q> |
subSet(BiNode<Q> src,
Q from,
Q to) |
BiTreeSet<Q> |
subSet(Q fromElement,
Q toElement) |
protected BiNode<Q> |
tailSet(BiNode<Q> src,
Q item) |
BiTreeSet<Q> |
tailSet(Q fromElement) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
public BiSearch(Comparator<Q> comp, Q item)
comp - item - public BiSearch(Comparator<Q> comparator, BiNode<Q> root)
comparator - root - protected boolean hasDuplicates(BiNode<Q> src)
src - sourceprotected boolean eq(Q data, BiNode<Q> src)
data - comparable objectsrc - sourceprotected boolean st(Q data, BiNode<Q> src)
data - comparable objectsrc - sourceprotected boolean gt(Q data, BiNode<Q> src)
data - comparable objectsrc - sourceprotected boolean btw(Q from, Q to, BiNode<Q> src)
data - comparable objectsrc - sourceprotected boolean le(BiNode<Q> src)
src - sourceprotected boolean re(BiNode<Q> src)
src - sourceprotected boolean lf(BiNode<Q> src)
src - sourceprotected int size(BiNode<Q> src)
src - sourceprotected int familySize(BiNode<Q> src)
src - sourceprotected Q minimum(BiNode<Q> src)
src - sourceprotected Q maximum(BiNode<Q> src)
src - sourceprotected BiNode<Q> minimumFamily(BiNode<Q> src)
src - sourceprotected BiNode<Q> maximumFamily(BiNode<Q> src)
src - sourceprotected BiNode<Q> add(BiNode<Q> src, Q item)
src - sourceitem - comparable objectpublic boolean add(Q item)
public boolean addAll(Collection<? extends Q> collection)
protected BiNode<Q> removeFamily(BiNode<Q> src, Q item)
src - sourceitem - comparable objectpublic void removeFamily(Q item)
removeFamily in interface BiTreeSet<Q>public void removeAllFamily(Collection<? extends Q> collection)
removeAllFamily in interface BiTreeSet<Q>public boolean remove(Object item)
public boolean removeAll(Collection<?> collection)
protected BiNode<Q> getFamily(BiNode<Q> src, Q item)
src - sourceitem - comparable objectpublic boolean containsFamily(Q item)
containsFamily in interface BiTreeSet<Q>public boolean containsAllFamily(Collection<Q> collection)
containsAllFamily in interface BiTreeSet<Q>protected BiNode<Q> get(BiNode<Q> src, Q item)
Q - generi typesrc - sourceitem - comparable objectpublic boolean contains(Object item)
public boolean containsAll(Collection<?> collection)
containsAll in interface Collection<Q>containsAll in interface Set<Q>containsAll in interface BiTreeSet<Q>public int size()
public Iterator<Q> lastFamily()
lastFamily in interface BiTreeSet<Q>public Iterator<Q> firstFamily()
firstFamily in interface BiTreeSet<Q>public Q last()
public Q first()
public java.util.stream.Stream<Q> stream()
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>protected BiNode<Q> subSet(BiNode<Q> src, Q from, Q to)
src - from - to - 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 boolean removeIf(java.util.function.Predicate<? super Q> filter)
Copyright © 2018 Terra Software Informatics LLC.. All rights reserved.