| Modifier and Type | Field and Description |
|---|---|
private TreeNode<E,K> |
TreeNode.leftChild
This instance variable is a reference to the left child of the current
TreeNode |
private TreeNode<E,K> |
TreeNode.parent
This instance variable is a reference to the parent of the current
TreeNode |
private TreeNode<E,K> |
TreeNode.rightChild
This instance variable is a reference to the right child of the current
TreeNode |
| Modifier and Type | Field and Description |
|---|---|
private java.util.Vector<TreeNode<E,K>> |
TreeElementIterator.treeNodes
A Vector that will be used to contain the elements in configure order (preOrder, inOrder, or postOrder).
|
| Modifier and Type | Method and Description |
|---|---|
TreeNode<E,K> |
TreeNode.getLeftChild()
Getter for
leftChild instance variable. |
TreeNode<E,K> |
TreeNode.getParent()
Getter for
parent instance variable. |
TreeNode<E,K> |
TreeNode.getRightChild()
Getter for
rightChild instance variable. |
TreeNode<E,K> |
BinarySearchTreeInterface.getRoot()
Method to get the current root of this BinarySearchTree
|
| Modifier and Type | Method and Description |
|---|---|
private void |
TreeElementIterator.inOrder(TreeNode<E,K> treeNode)
A recursive method that traverses the binary search tree rooted at the
specified
treeNode in in-order, adding the visited nodes
to the treeNodes Vector. |
private void |
TreeElementIterator.postOrder(TreeNode<E,K> treeNode)
A recursive method that traverses the binary search tree rooted at the
specified
treeNode in post-order, adding the visited nodes
to the treeNodes Vector. |
private void |
TreeElementIterator.preOrder(TreeNode<E,K> treeNode)
A recursive method that traverses the binary search tree rooted at the
specified
treeNode in pre-order, adding the visited nodes
to the treeNodes Vector. |
void |
TreeNode.setLeftChild(TreeNode<E,K> leftChild)
Setter for
leftChild instance variable. |
void |
TreeNode.setParent(TreeNode<E,K> parent)
Setter for
parent instance variable. |
void |
TreeNode.setRightChild(TreeNode<E,K> rightChild)
Setter for
rightChild instance variable. |
void |
BinarySearchTreeInterface.setRoot(TreeNode<E,K> root)
Method to set set the root of this BinarySearchTree
|