|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcalculation.TreeNode
public class TreeNode
Class TreeNode implements nodes for class Tree, which implements the arrival tree for air planes. TreeNode determines a node which corresponds a particular Vertex in a graph. Each TreeNode has a parent and two children.
| Field Summary | |
|---|---|
private TreeNode |
left
Left child of a tree node. |
private TreeNode |
parent
Parent node of a tree node. |
private TreeNode |
right
Right child of a tree node. |
private Vertex |
vertex
Vertex this node represents. |
| Constructor Summary | |
|---|---|
TreeNode(Vertex nodeId)
Constructor. |
|
| Method Summary | |
|---|---|
TreeNode |
getLeft()
Returns this.left. |
TreeNode |
getParent()
Returns this.parent. |
TreeNode |
getRight()
Returns this.right. |
Vertex |
getVertex()
Returns this.vertex. |
boolean |
setChild(TreeNode child)
Sets child (left or right, first left) for node. |
void |
setParent(TreeNode parent)
Sets this.parent. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private TreeNode left
private TreeNode parent
private TreeNode right
private Vertex vertex
| Constructor Detail |
|---|
public TreeNode(Vertex nodeId)
nodeId - Vertex this tree node represent.| Method Detail |
|---|
public TreeNode getLeft()
public TreeNode getParent()
public TreeNode getRight()
public Vertex getVertex()
public boolean setChild(TreeNode child)
child - Tree node to be set as child.
public void setParent(TreeNode parent)
parent - Tree node to be set as parent.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||