|
Joda System API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
TreeNode defines a node in a tree structure. The easiest way to use the node is to use the user object parameter.
Nested Class Summary | |
static interface |
TreeNode.Internal
TreeNode implementors should implement TreeNode.Internal instead of just TreeNode. |
Method Summary | |
TreeNode |
getChild(int index)
Get the child of this node at a particular index |
java.util.List |
getChildren()
Get the children of this node |
TreeNode |
getParent()
Get the parent of this node |
java.lang.Object |
getValue()
Get the user object of this node |
boolean |
isLeaf()
Is this a leaf node (has no children) |
boolean |
isRoot()
Is this a root node (has no parent) |
void |
removeFromParent()
Detach this node from its parent |
void |
setValue(java.lang.Object object)
Set the user object of this node |
TreeIterator |
treeIterator()
Get a tree iterator from this node. |
Method Detail |
public boolean isRoot()
public TreeNode getParent()
public boolean isLeaf()
public TreeNode getChild(int index)
index
- the index to obtain
public java.util.List getChildren()
public void removeFromParent()
public TreeIterator treeIterator()
public java.lang.Object getValue()
public void setValue(java.lang.Object object)
object
- the new user object value
|
Joda System API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |