edu.princeton.cs.algs4.growingtree.demos
Class RedBlackInsertion<P extends RBNodeProperties>

java.lang.Object
  extended by edu.princeton.cs.algs4.growingtree.demos.RedBlackOperator<P>
      extended by edu.princeton.cs.algs4.growingtree.demos.RedBlackInsertion<P>
All Implemented Interfaces:
IInsertOperator<P>

public class RedBlackInsertion<P extends RBNodeProperties>
extends RedBlackOperator<P>
implements IInsertOperator<P>


Constructor Summary
RedBlackInsertion()
           
 
Method Summary
 void doInsert(IInsertingNode<P> root, INode<P> newNode)
           
 
Methods inherited from class edu.princeton.cs.algs4.growingtree.demos.RedBlackOperator
isRed
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RedBlackInsertion

public RedBlackInsertion()
Method Detail

doInsert

public void doInsert(IInsertingNode<P> root,
                     INode<P> newNode)
Specified by:
doInsert in interface IInsertOperator<P extends RBNodeProperties>
Parameters:
root - Root of the tree
newNode - Node to be inserted into the tree. Null when inserting into an empty tree.