edu.princeton.cs.algs4.growingtree.demos
Class AVLNodeProperties

java.lang.Object
  extended by edu.princeton.cs.algs4.growingtree.framework.NodeProperties
      extended by edu.princeton.cs.algs4.growingtree.demos.AVLNodeProperties
All Implemented Interfaces:
java.lang.Cloneable

public class AVLNodeProperties
extends NodeProperties


Field Summary
 
Fields inherited from class edu.princeton.cs.algs4.growingtree.framework.NodeProperties
NULL_HEIGHT
 
Constructor Summary
AVLNodeProperties()
           
 
Method Summary
 java.lang.Integer getULIntegerFieldValue()
           
 AVLNodeProperties makeDefaultProperties()
          This functions as a factory for NodeProperty objects.
 
Methods inherited from class edu.princeton.cs.algs4.growingtree.framework.NodeProperties
clone, colorParentLink, getHeight, getIntegerFieldColor, getLeftLinkColor, getLLIntegerFieldValue, getLRIntegerFieldValue, getNodeColor, getRightLinkColor, getSize, getURIntegerFieldValue, setHeight, setSize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AVLNodeProperties

public AVLNodeProperties()
Method Detail

getULIntegerFieldValue

public java.lang.Integer getULIntegerFieldValue()
Overrides:
getULIntegerFieldValue in class NodeProperties
Returns:
The value the upper right integer field should contain, or null if nothing should be drawn. This is not to be confused with the actual key value of the node. It is to be used for values like height or rank.

makeDefaultProperties

public AVLNodeProperties makeDefaultProperties()
Description copied from class: NodeProperties
This functions as a factory for NodeProperty objects. It is called whenever a new node is created (for insertion into the tree). If extended, this MUST be overridden to return an instance of the subclass as a result of some of the quirks of Java generics.

Overrides:
makeDefaultProperties in class NodeProperties
Returns:
An instance of this class. Subclasses should return an instance of the subclass.