C E G H I S T

C

compareTo(Object) - Method in class TreeNode
Compare two objects of (probably) the same kind.

E

equals(Object) - Method in class TreeNode
Check if the current node is equal to the other node.

G

getLeft() - Method in class TreeNode
Get the left child
getRight() - Method in class TreeNode
Get the right child

H

haveLeft() - Method in class TreeNode
Test if the left child is not null
haveRight() - Method in class TreeNode
Test if the right child is not null

I

isGreaterThan(TreeNode) - Method in class TreeNode
See if the current node is larger
isLeaf() - Method in class TreeNode
Test if the current node is a leaf
isLessThan(TreeNode) - Method in class TreeNode
See if the current node is less

S

setLeft(TreeNode) - Method in class TreeNode
Store the new node to the left of the current one only if the current node's left child is null.
setRight(TreeNode) - Method in class TreeNode
Store the new node to the right of the current one only if the current node's right child is null.

T

TreeNode - class TreeNode.
Author: Clare So
Revised: March 15, 2007

Description: Specifies a node in a binary tree
Features:
Any type of comparable objects can be stored Contents of the node cannot be updated
TreeNode(Comparable) - Constructor for class TreeNode
Constructor of TreeNode
toString() - Method in class TreeNode
Create a string representation of the node

C E G H I S T