|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object TreeNode<T>
public class TreeNode<T>
Constructor Summary | |
---|---|
TreeNode(T newItem)
Constructor for a TreeNode . |
|
TreeNode(T newItem,
TreeNode<T> left,
TreeNode<T> right)
Constructor for a TreeNode . |
Method Summary | |
---|---|
T |
getItem()
Getter for the data item contained in this TreeNode |
TreeNode<T> |
getLeftChild()
Getter for the left child of this TreeNode |
TreeNode<T> |
getRightChild()
Getter for the right child of this TreeNode |
void |
setItem(T item)
Setter for the data item contained in this TreeNode |
void |
setLeftChild(TreeNode<T> leftChild)
Setter for left child of this TreeNode |
void |
setRightChild(TreeNode<T> rightChild)
Setter for right child of this TreeNode |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TreeNode(T newItem)
TreeNode
.
newItem
- The data item to be contained in this TreeNode
public TreeNode(T newItem, TreeNode<T> left, TreeNode<T> right)
TreeNode
.
newItem
- The data item to be contained in this TreeNode
left
- The left child of this TreeNode
right
- The right child of this TreeNode
Method Detail |
---|
public T getItem()
TreeNode
TreeNode
public void setItem(T item)
TreeNode
item
- The data item to be contained in this TreeNode
public TreeNode<T> getLeftChild()
TreeNode
TreeNode
public void setLeftChild(TreeNode<T> leftChild)
TreeNode
leftChild
- The left child of this TreeNode
public TreeNode<T> getRightChild()
TreeNode
TreeNode
public void setRightChild(TreeNode<T> rightChild)
TreeNode
rightChild
- The right child of this TreeNode
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |