public class RBTree<K extends Comparable<? super K>,V> extends Object implements Serializable
http://en.literateprograms.org/Red-black_tree_%28Java%29
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
RBTree.Boundary |
static class |
RBTree.Color |
static class |
RBTree.Node<K extends Comparable<? super K>,V> |
static class |
RBTree.RBTreeFastIterator<K extends Comparable<? super K>,V> |
Modifier and Type | Field and Description |
---|---|
RBTree.Node<K,V> |
root |
static boolean |
VERIFY_RBTREE |
Constructor and Description |
---|
RBTree() |
Modifier and Type | Method and Description |
---|---|
void |
delete(K key) |
FastIterator |
fastIterator() |
RBTree.Node<K,V> |
findNearestNode(K key,
boolean allowEqual,
RBTree.Boundary boundary) |
RBTree.Node<K,V> |
first() |
void |
insert(K key,
V value) |
boolean |
isEmpty() |
RBTree.Node<K,V> |
last() |
V |
lookup(K key) |
void |
print() |
FastIterator |
range(K lowerBound,
boolean testLowerEqual,
K upperBound,
boolean testUpperEqual) |
void |
verifyProperties() |
public static final boolean VERIFY_RBTREE
public RBTree.Node<K extends Comparable<? super K>,V> root
public void verifyProperties()
public boolean isEmpty()
public RBTree.Node<K,V> first()
public RBTree.Node<K,V> last()
public FastIterator fastIterator()
public FastIterator range(K lowerBound, boolean testLowerEqual, K upperBound, boolean testUpperEqual)
public RBTree.Node<K,V> findNearestNode(K key, boolean allowEqual, RBTree.Boundary boundary)
public void delete(K key)
public void print()
Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.