|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.wegra.util.collection.TreeNode
| Constructor Summary | |
TreeNode()
|
|
TreeNode(java.lang.Object value)
|
|
| Method Summary | |
void |
add(TreeNode child)
Adds new child to current tree. |
TreeNode |
getChildAt(int index)
Returns the child WTreeNode at index. |
int |
getChildCount()
Returns the count of children. |
java.util.Iterator |
getChildren()
Returns all child nodes. |
int |
getIndex(TreeNode child)
Returns index of specified child. |
TreeNode |
getParent()
Returns parent node. |
java.lang.Object |
getValue()
Returns current node's value. |
boolean |
isLeaf()
Tests if it's leaf node. |
boolean |
isRoot()
Tests if it's root node. |
void |
removeAllChildren()
Removes all children. |
TreeNode |
removeChild(TreeNode child)
Removes child from current tree. |
void |
removeFromParent()
Removes itself from parent. |
void |
setParent(TreeNode parent)
Resets parent node. |
void |
setValue(java.lang.Object value)
Resets current node's value. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public TreeNode()
public TreeNode(java.lang.Object value)
| Method Detail |
public final java.lang.Object getValue()
public final void setValue(java.lang.Object value)
value - new valuepublic final boolean isRoot()
public boolean isLeaf()
public final TreeNode getParent()
public final void setParent(TreeNode parent)
parent - node.public TreeNode getChildAt(int index)
index - index.
public int getChildCount()
public java.util.Iterator getChildren()
public void add(TreeNode child)
child - new child.public TreeNode removeChild(TreeNode child)
public void removeAllChildren()
public int getIndex(TreeNode child)
child - child.
public void removeFromParent()
public java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||