|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.richfaces.model.TreeNodeImpl
public class TreeNodeImpl
Default TreeNode implementation based on LinkedHashMap to preserve
elements ordering
| Constructor Summary | |
|---|---|
TreeNodeImpl()
|
|
| Method Summary | |
|---|---|
void |
addChild(java.lang.Object identifier,
TreeNode child)
adds child to children collection |
TreeNode |
getChild(java.lang.Object identifier)
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 identifier)
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TreeNodeImpl()
| Method Detail |
|---|
public java.lang.Object getData()
TreeNode
getData in interface TreeNodepublic TreeNode getChild(java.lang.Object identifier)
TreeNode
getChild in interface TreeNodeidentifier - identifier of the child to find
TreeNode instance or null
public void addChild(java.lang.Object identifier,
TreeNode child)
TreeNode
addChild in interface TreeNodeidentifier - child identifierchild - childpublic void removeChild(java.lang.Object identifier)
TreeNode
removeChild in interface TreeNodeidentifier - id of the child to removepublic void setData(java.lang.Object data)
TreeNode
setData in interface TreeNodedata - data to set as attached node datapublic TreeNode getParent()
TreeNodeTreeNode
getParent in interface TreeNodeTreeNode instance or null if this node is rootpublic void setParent(TreeNode parent)
TreeNodeTreeNode
setParent in interface TreeNodeparent - TreeNode to set as parentpublic java.util.Iterator getChildren()
TreeNode
getChildren in interface TreeNodeIterator of Map.Entry instances containing TreeNode as values
and their identifiers as keyspublic boolean isLeaf()
TreeNode
isLeaf in interface TreeNodetrue if this node is leaf else returns false
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||