All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jdsltools.visualization.Wrappers.VRBTree

java.lang.Object
   |
   +----jdsl.core.ref.RBTree
           |
           +----jdsltools.visualization.Wrappers.VRBTree

public class VRBTree
extends RBTree
implements BinaryTreeBased, RedBlackBased
This is a visualizable extension of jdsl.core.ref.RBTreep.

Author:
Ryan Shaun Baker

Constructor Index

 o VRBTree(Comparator)

Method Index

 o case1(Position)
take care of case 1 after deletion: sib is red
 o case2(Position)
 o case3(Position)
 o case4(Position)
 o colorPromotion(Position)
handy color promotion method.....promotes the red up
 o getBinaryTree()
 o getColorInfo()
 o insert(Locator)
Inserts a locator into the tree.
 o newContainer()
 o recolor(Position)
 o recolorAfterRemove(Position)
 o remove(Locator)
 o replaceElement(Locator, Object)
Replaces the element of the passed in locator
 o replaceKey(Locator, Object)
Replaces the key of the passed in locator
 o rotation(Position)
silly method that just calls restructure on the restructurable BT

Constructors

 o VRBTree
 public VRBTree(Comparator c)

Methods

 o getBinaryTree
 public InspectableBinaryTree getBinaryTree()
 o getColorInfo
 public RedBlackTreeColorInfo getColorInfo()
 o newContainer
 public Container newContainer()
Overrides:
newContainer in class RBTree
 o insert
 public void insert(Locator locator) throws InvalidKeyException, InvalidLocatorException, ContainedLocatorException
Inserts a locator into the tree.

Overrides:
insert in class RBTree
 o remove
 public void remove(Locator locator) throws InvalidLocatorException
Overrides:
remove in class RBTree
 o replaceKey
 public Object replaceKey(Locator locator,
                          Object key) throws InvalidLocatorException, InvalidKeyException
Replaces the key of the passed in locator

Overrides:
replaceKey in class RBTree
 o replaceElement
 public Object replaceElement(Locator locator,
                              Object key) throws InvalidLocatorException, InvalidKeyException
Replaces the element of the passed in locator

Overrides:
replaceElement in class RBTree
 o recolorAfterRemove
 protected void recolorAfterRemove(Position child)
Overrides:
recolorAfterRemove in class RBTree
 o case1
 protected void case1(Position child)
take care of case 1 after deletion: sib is red

Overrides:
case1 in class RBTree
 o case2
 protected void case2(Position child)
Overrides:
case2 in class RBTree
 o case3
 protected Position case3(Position child)
Overrides:
case3 in class RBTree
 o case4
 protected void case4(Position child)
Overrides:
case4 in class RBTree
 o colorPromotion
 protected void colorPromotion(Position parent)
handy color promotion method.....promotes the red up

Overrides:
colorPromotion in class RBTree
 o rotation
 protected Position rotation(Position grandchild)
silly method that just calls restructure on the restructurable BT

Overrides:
rotation in class RBTree
 o recolor
 protected void recolor(Position root)
Overrides:
recolor in class RBTree

All Packages  Class Hierarchy  This Package  Previous  Next  Index