|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.richfaces.model.TreeNodeImpl<T>
public class TreeNodeImpl<T>
Default TreeNode
implementation based on LinkedHashMap
to preserve
elements ordering
Constructor Summary | |
---|---|
TreeNodeImpl()
|
Method Summary | |
---|---|
void |
addChild(java.lang.Object identifier,
TreeNode<T> child)
adds child to children collection |
TreeNode<T> |
getChild(java.lang.Object identifier)
find child by id Please see TreeNode.getChildren() for more information about identifier constraints. |
java.util.Iterator<java.util.Map.Entry<java.lang.Object,TreeNode<T>>> |
getChildren()
Getter for children entries. |
T |
getData()
getter for node attached data |
TreeNode<T> |
getParent()
getter for parent TreeNode |
boolean |
isLeaf()
Returns whether this node is leaf |
void |
removeChild(java.lang.Object identifier)
Please see TreeNode.getChildren() for more information about identifier constraints. |
void |
setData(T data)
setter for node attached data |
void |
setParent(TreeNode<T> 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 T getData()
TreeNode
getData
in interface TreeNode<T>
public TreeNode<T> getChild(java.lang.Object identifier)
TreeNode
TreeNode.getChildren()
for more information about identifier constraints.
getChild
in interface TreeNode<T>
identifier
- identifier of the child to find
TreeNode
instance or null
public void addChild(java.lang.Object identifier, TreeNode<T> child)
TreeNode
addChild
in interface TreeNode<T>
identifier
- child identifier.
Please see TreeNode.getChildren()
for more information about identifier constraints.child
- childpublic void removeChild(java.lang.Object identifier)
TreeNode
TreeNode.getChildren()
for more information about identifier constraints.
removes child from children collection by child id
removeChild
in interface TreeNode<T>
identifier
- id of the child to removepublic void setData(T data)
TreeNode
setData
in interface TreeNode<T>
data
- data to set as attached node datapublic TreeNode<T> getParent()
TreeNode
TreeNode
getParent
in interface TreeNode<T>
TreeNode
instance or null
if this node is rootpublic void setParent(TreeNode<T> parent)
TreeNode
TreeNode
setParent
in interface TreeNode<T>
parent
- TreeNode
to set as parentpublic java.util.Iterator<java.util.Map.Entry<java.lang.Object,TreeNode<T>>> getChildren()
TreeNode
Object.toString()
representations of identifier separated with
NamingContainer.SEPARATOR_CHAR
chars. String representation of identifier
should be a valid XML ID, e.g. conform to this:
XML Name Production
production.
getChildren
in interface TreeNode<T>
Iterator
of Map.Entry
instances containing TreeNode
as values
and their identifiers as keys.public boolean isLeaf()
TreeNode
isLeaf
in interface TreeNode<T>
true
if this node is leaf else returns false
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |