edu.princeton.cs.algs4.growingtree.demos
Class AVLInsertion<P extends AVLNodeProperties>

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

public class AVLInsertion<P extends AVLNodeProperties>
extends AVLOperator<P>
implements IInsertOperator<P>


Constructor Summary
AVLInsertion()
           
AVLInsertion(int balFactor)
           
 
Method Summary
 void doInsert(IInsertingNode<P> root, INode<P> newNode)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AVLInsertion

public AVLInsertion()

AVLInsertion

public AVLInsertion(int balFactor)
Method Detail

doInsert

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