|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TreeNode
Method Summary | |
---|---|
void |
addChild(java.lang.Object identifier,
TreeNode child)
adds child to children collection |
TreeNode |
getChild(java.lang.Object id)
find child by id |
java.util.Iterator |
getChildren()
getter for children |
java.lang.Object |
getData()
getter for node attached data |
TreeNode |
getParent()
getter for parent TreeNode |
boolean |
isLeaf()
Returns whether this node is leaf |
void |
removeChild(java.lang.Object id)
removes child from children collection by child id |
void |
setData(java.lang.Object data)
setter for node attached data |
void |
setParent(TreeNode parent)
setter for parent TreeNode |
Method Detail |
---|
java.lang.Object getData()
void setData(java.lang.Object data)
data
- data to set as attached node databoolean isLeaf()
true
if this node is leaf else returns false
java.util.Iterator getChildren()
Iterator
of Map.Entry
instances containing TreeNode
as values
and their identifiers as keysTreeNode getChild(java.lang.Object id)
id
- identifier of the child to find
TreeNode
instance or null
void addChild(java.lang.Object identifier, TreeNode child)
identifier
- child identifierchild
- childvoid removeChild(java.lang.Object id)
id
- id of the child to removeTreeNode getParent()
TreeNode
TreeNode
instance or null
if this node is rootvoid setParent(TreeNode parent)
TreeNode
parent
- TreeNode
to set as parent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |