Drools :: Core 6.0.0.Beta5

org.drools.core.util
Class RBTree<K extends Comparable<? super K>,V>

java.lang.Object
  extended by org.drools.core.util.RBTree<K,V>
All Implemented Interfaces:
Serializable

public class RBTree<K extends Comparable<? super K>,V>
extends Object
implements Serializable

See Also:
http://en.literateprograms.org/Red-black_tree_%28Java%29, Serialized Form

Nested Class Summary
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>
           
 
Field Summary
 RBTree.Node<K,V> root
           
static boolean VERIFY_RBTREE
           
 
Constructor Summary
RBTree()
           
 
Method Summary
 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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERIFY_RBTREE

public static final boolean VERIFY_RBTREE
See Also:
Constant Field Values

root

public RBTree.Node<K extends Comparable<? super K>,V> root
Constructor Detail

RBTree

public RBTree()
Method Detail

verifyProperties

public void verifyProperties()

isEmpty

public boolean isEmpty()

first

public RBTree.Node<K,V> first()

last

public RBTree.Node<K,V> last()

fastIterator

public FastIterator fastIterator()

range

public FastIterator range(K lowerBound,
                          boolean testLowerEqual,
                          K upperBound,
                          boolean testUpperEqual)

findNearestNode

public RBTree.Node<K,V> findNearestNode(K key,
                                        boolean allowEqual,
                                        RBTree.Boundary boundary)

lookup

public V lookup(K key)

insert

public void insert(K key,
                   V value)

delete

public void delete(K key)

print

public void print()

Drools :: Core 6.0.0.Beta5

Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.