|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.compilers.opt.util.TreeNode
public class TreeNode
This class is a node in a tree. Both up and down pointers are used.
Field Summary | |
---|---|
private TreeNode |
leftChild
The first (leftmost) child |
private TreeNode |
parent
The parent of this node |
private TreeNode |
rightSibling
The next node on the child list that I am on |
Constructor Summary | |
---|---|
TreeNode()
Constructor |
Method Summary | |
---|---|
void |
addChild(TreeNode node)
adds a child to this node |
void |
clear()
Sets all tree pointers to null |
Enumeration<TreeNode> |
getChildren()
|
TreeNode |
getLeftChild()
returns the first child of this node |
TreeNode |
getParent()
return the parent of this node |
TreeNode |
getRightSibling()
returns the next node with the same parent as me |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private TreeNode parent
private TreeNode leftChild
private TreeNode rightSibling
Constructor Detail |
---|
public TreeNode()
Method Detail |
---|
public TreeNode getParent()
public TreeNode getLeftChild()
public TreeNode getRightSibling()
public void addChild(TreeNode node)
node
- the new childpublic void clear()
public Enumeration<TreeNode> getChildren()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |