public abstract class RedBlackTree<K>
extends java.util.concurrent.atomic.AtomicInteger
Modifier and Type | Class and Description |
---|---|
static class |
RedBlackTree.Node<K> |
Modifier and Type | Field and Description |
---|---|
protected RedBlackTree.Node<K> |
root |
static boolean |
VERIFY |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
protected void |
deleteNode(RedBlackTree.Node<K> n) |
protected RedBlackTree.Node<K> |
maximumNode(RedBlackTree.Node<K> n) |
void |
print() |
protected void |
replaceNode(RedBlackTree.Node<K> oldn,
RedBlackTree.Node<K> newn) |
protected void |
rotateLeft(RedBlackTree.Node<K> n) |
protected void |
rotateRight(RedBlackTree.Node<K> n) |
int |
size() |
protected abstract RedBlackTree.Node<K> |
swapWithMaxPred(RedBlackTree.Node<K> nowAscendant,
RedBlackTree.Node<K> nowDescendant) |
accumulateAndGet, addAndGet, compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, decrementAndGet, doubleValue, floatValue, get, getAcquire, getAndAccumulate, getAndAdd, getAndDecrement, getAndIncrement, getAndSet, getAndUpdate, getOpaque, getPlain, incrementAndGet, intValue, lazySet, longValue, set, setOpaque, setPlain, setRelease, toString, updateAndGet, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
public static boolean VERIFY
protected RedBlackTree.Node<K> root
protected void rotateLeft(RedBlackTree.Node<K> n)
protected void rotateRight(RedBlackTree.Node<K> n)
protected void replaceNode(RedBlackTree.Node<K> oldn, RedBlackTree.Node<K> newn)
protected void deleteNode(RedBlackTree.Node<K> n)
protected abstract RedBlackTree.Node<K> swapWithMaxPred(RedBlackTree.Node<K> nowAscendant, RedBlackTree.Node<K> nowDescendant)
protected RedBlackTree.Node<K> maximumNode(RedBlackTree.Node<K> n)
public void print()
public int size()
public void clear()