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

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

public class RankNodeProperties
extends NodeProperties


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

Constructor Detail

RankNodeProperties

public RankNodeProperties()
Method Detail

makeDefaultProperties

public RankNodeProperties 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.

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.

getLLIntegerFieldValue

public java.lang.Integer getLLIntegerFieldValue()
Overrides:
getLLIntegerFieldValue in class NodeProperties
Returns:
The value the lower left 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.

getLRIntegerFieldValue

public java.lang.Integer getLRIntegerFieldValue()
Overrides:
getLRIntegerFieldValue in class NodeProperties
Returns:
The value the lower 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.

setLRrankDiff

public void setLRrankDiff(int lRrankDiff)

getLRrankDiff

public int getLRrankDiff()

setLLrankDiff

public void setLLrankDiff(int lLrankDiff)

getLLrankDiff

public int getLLrankDiff()

setRank

public void setRank(int r)

getRank

public int getRank()