public class BaseRedBlackTree<N extends RedBlackNode<N>>
extends java.lang.Object
Created by covers1624 on 16/5/21.
| Modifier and Type | Class and Description |
|---|---|
protected class |
BaseRedBlackTree.Entries |
| Modifier and Type | Field and Description |
|---|---|
protected int |
count |
| Constructor and Description |
|---|
BaseRedBlackTree() |
| Modifier and Type | Method and Description |
|---|---|
void |
buildFrom(java.util.List<N> nodes) |
N |
buildFrom(java.util.List<N> nodes,
int a,
int b,
int bh) |
Object2IntPair<N> |
closest(Object2IntFunction<N> comp) |
java.util.Collection<N> |
entries() |
N |
find(Object2IntFunction<N> comp) |
N |
getLeftMost() |
N |
getRightMost() |
N |
getRoot() |
void |
insertAt(N loc,
boolean right,
N node) |
void |
insertRange(N loc,
java.lang.Iterable<N> nodes) |
protected BaseRedBlackTree.Entries |
makeEntriesCollection() |
protected void |
orderConsistencyCheck(N left,
N right) |
void |
removeRange(N first,
N last) |
void |
replace(N loc,
N node) |
void |
setRoot(N root) |
public java.util.Collection<N> entries()
@Nullable public N find(Object2IntFunction<N> comp)
public Object2IntPair<N> closest(Object2IntFunction<N> comp)
public void buildFrom(java.util.List<N> nodes)
protected BaseRedBlackTree.Entries makeEntriesCollection()
@Nullable public N getRoot()
public void setRoot(@Nullable
N root)
@Nullable public N getLeftMost()
@Nullable public N getRightMost()