Package io.keikaiex.util
Class RBTree<K,V>
- java.lang.Object
-
- io.keikaiex.util.RBTree<K,V>
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
IntervalTree
public class RBTree<K,V> extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RBTree(Comparator<K> comparator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.keikaiex.util.RBNode<K,V>
delete(K key, Object context)
protected void
fixUp(List<io.keikaiex.util.RBTree.Traversal<K,V>> lineal)
io.keikaiex.util.RBNode<K,V>
insert(io.keikaiex.util.RBNode<K,V> node, Object context)
protected void
insertDuplicate(io.keikaiex.util.RBNode<K,V> original, io.keikaiex.util.RBNode<K,V> newone, Object context)
protected void
insertLeft(io.keikaiex.util.RBNode<K,V> parent, io.keikaiex.util.RBNode<K,V> child)
protected void
insertRight(io.keikaiex.util.RBNode<K,V> parent, io.keikaiex.util.RBNode<K,V> child)
boolean
isEmpty()
protected void
leftJumpUp(io.keikaiex.util.RBNode<K,V> g)
protected void
rightJumpUp(io.keikaiex.util.RBNode<K,V> g)
protected void
rotateLeft(io.keikaiex.util.RBNode<K,V> g)
protected void
rotateRight(io.keikaiex.util.RBNode<K,V> g)
io.keikaiex.util.RBNode<K,V>
search(K key)
-
-
-
Constructor Detail
-
RBTree
public RBTree(Comparator<K> comparator)
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
-
insert
public io.keikaiex.util.RBNode<K,V> insert(io.keikaiex.util.RBNode<K,V> node, Object context)
-
insertDuplicate
protected void insertDuplicate(io.keikaiex.util.RBNode<K,V> original, io.keikaiex.util.RBNode<K,V> newone, Object context)
-
insertLeft
protected void insertLeft(io.keikaiex.util.RBNode<K,V> parent, io.keikaiex.util.RBNode<K,V> child)
-
insertRight
protected void insertRight(io.keikaiex.util.RBNode<K,V> parent, io.keikaiex.util.RBNode<K,V> child)
-
-