|
Joda System API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.joda.util.ArrayTreeNode
ArrayTreeNode implements the TreeNode interface. An ArrayList is used to store the children behind the scenes.
| Nested Class Summary | |
static class |
ArrayTreeNode.DepthFirstTreeIterator
Implementation of TreeIterator that navigates through the nodes in a depth first order. |
static class |
ArrayTreeNode.TreeArrayList
List of TreeNodes that manages the parent behaviour |
| Nested classes inherited from class org.joda.util.TreeNode |
TreeNode.Internal |
| Constructor Summary | |
ArrayTreeNode()
Constructor |
|
ArrayTreeNode(java.lang.Object value)
Constructor |
|
| 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 |
setParent(TreeNode node)
Set the parent of this node |
void |
setValue(java.lang.Object object)
Set the user object of this node |
java.lang.String |
toString()
Get a debugging string |
TreeIterator |
treeIterator()
Get a tree iterator from this node. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ArrayTreeNode()
public ArrayTreeNode(java.lang.Object value)
| Method Detail |
public boolean isRoot()
isRoot in interface TreeNodepublic TreeNode getParent()
getParent in interface TreeNodepublic void setParent(TreeNode node)
setParent in interface TreeNode.Internalnode - the new parent node
public boolean isLeaf()
isLeaf in interface TreeNodepublic TreeNode getChild(int index)
getChild in interface TreeNodeindex - the index to obtain
public java.util.List getChildren()
getChildren in interface TreeNodepublic void removeFromParent()
removeFromParent in interface TreeNodepublic TreeIterator treeIterator()
treeIterator in interface TreeNodepublic java.lang.Object getValue()
getValue in interface TreeNodepublic void setValue(java.lang.Object object)
setValue in interface TreeNodeobject - the new user object valuepublic java.lang.String toString()
toString in class java.lang.Object
|
Joda System API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||