|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectBinarySearchTree.BSTNode
Contains the data for each node in the BinarySearchTree as well as a set of functions that performs some important calculations on nodes to analyze and manipulate the tree structure. This class implements the cloneable interface. It does *not* attempt to clone the key and value members held in this node.
Field Summary | |
java.lang.Object |
key
Reference to the key this Node represents |
BinarySearchTree.BSTNode |
left
Reference to the node that is considered the left child of this node in the tree structure. |
BinarySearchTree.BSTNode |
parent
Reference to the node that is considered the parent of this node in the tree structure. |
BinarySearchTree.BSTNode |
right
Reference to the node that is considered the right child of this node in the tree structure. |
java.lang.Object |
value
Reference to the value this Node represents |
Method Summary | |
java.lang.Object |
clone()
Copy the current instance into a new BSTNode. |
void |
print(java.io.PrintWriter writer,
java.lang.String filler)
Pretty-Print this node and its subtree. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public java.lang.Object key
public java.lang.Object value
public BinarySearchTree.BSTNode parent
public BinarySearchTree.BSTNode left
public BinarySearchTree.BSTNode right
Method Detail |
public void print(java.io.PrintWriter writer, java.lang.String filler)
writer
- The PrintWriter
to output the pretty
printed tree to.filler
- The filler character to use while printing.
(Usually and emptry string if you're calling this function from
the outside).public java.lang.Object clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |