|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--tree.MyNode
This is a node in a binary search tree. The node holds an integer value.
MyTree
Constructor Summary | |
MyNode(int value)
Class constructor initializing this node's value. |
Method Summary | |
int |
calcSize()
Calculate the size this subtree. |
MyNode |
getFather()
Gets the father of this node. |
MyNode |
getLeftChild()
Gets the left child of this node. |
MyNode |
getRightChild()
Gets the right child of this node. |
int |
getValue()
Gets the value of this node. |
void |
setFather(MyNode father)
Sets the father of this node. |
void |
setLeftChild(MyNode left)
Sets the left child of this node. |
void |
setRightChild(MyNode right)
Sets the right child of this node. |
void |
setValue(int value)
Sets the vlaue of this node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MyNode(int value)
value
- The value of this node.Method Detail |
public int getValue()
public void setValue(int value)
value
- The new value of this node.public MyNode getFather()
public void setFather(MyNode father)
father
- The new father of this node.public MyNode getRightChild()
public void setRightChild(MyNode right)
right
- The new right child of this node.public MyNode getLeftChild()
public void setLeftChild(MyNode left)
left
- The new left child of this node.public int calcSize()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |