|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--uk.ac.bbk.dcs.automed.graph.TreeNode
Class that abstracts the node of a tree structure.
IMPORTANT: at the moment, the children of a tree node are a set and not a list.
| Constructor Summary | |
protected |
TreeNode(java.lang.String name)
|
| Method Summary | |
protected void |
addChild(TreeNode t)
Adds a node to the set of children of the node |
java.util.HashSet |
getChildren()
|
java.lang.String |
getName()
|
TreeNode |
getParent()
|
protected boolean |
isLeaf()
|
boolean |
isRoot()
|
protected void |
setChildren(java.util.HashSet s)
Sets the children of the node. |
protected void |
setParent(TreeNode n)
Sets the parent node. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected TreeNode(java.lang.String name)
name - the name of the node| Method Detail |
protected void setParent(TreeNode n)
n - the parent nodepublic boolean isRoot()
protected boolean isLeaf()
public TreeNode getParent()
public java.util.HashSet getChildren()
protected void setChildren(java.util.HashSet s)
s - the set of childrenprotected void addChild(TreeNode t)
t - the node to add in the set of childrenpublic java.lang.String getName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||