edu.gwu.algtest
Class TreeNode
java.lang.Object
|
+--edu.gwu.algtest.ComparableKeyValuePair
|
+--edu.gwu.algtest.TreeNode
- public class TreeNode
- extends edu.gwu.algtest.ComparableKeyValuePair
Fields inherited from class edu.gwu.algtest.ComparableKeyValuePair |
key, value |
Method Summary |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
left
public TreeNode left
Pointer to the left child, if any.
right
public TreeNode right
Pointer to the right child, if any.
parent
public TreeNode parent
Pointer to the parent, if any.
height
public int height
Used in AVL trees.
ID
public int ID
The ID is different for every node. It is sometimes useful in
debugging and is included in the toString output.
TreeNode
public TreeNode()
TreeNode
public TreeNode(java.lang.Comparable key,
java.lang.Object value)
TreeNode
public TreeNode(java.lang.Comparable key,
java.lang.Object value,
TreeNode left,
TreeNode right,
TreeNode parent)
toString
public java.lang.String toString()
- Overrides:
toString
in class edu.gwu.algtest.ComparableKeyValuePair