| Constructor and Description |
|---|
TreeNodeImpl(TreeNode<T> parent,
T object,
String name)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
TreeNode<T> |
addChild(TreeNode<T> child)
Add the specified child node.
|
TreeNode<T> |
addChild(T child,
String name)
Add a child node for the provided object.
|
TreeNode<T> |
getChild(String name)
Find a child node by name.
|
Collection<TreeNode<T>> |
getChildren()
Obtain the list of child nodes.
|
String |
getName()
Obtain the name of the node.
|
T |
getObject()
Obtain the object associated with this node.
|
TreeNode<T> |
getParent()
Obtain the parent node or null if this node is the root.
|
Object |
getProperty(String name)
Get the specified node property.
|
String |
getStringProperty(String name)
Get the specified node property as a String.
|
TreeNode<T> |
removeChild(String name)
Remove a child from this resource.
|
void |
removeProperty(String name)
Remove a property from the node.
|
void |
setName(String name)
Set the name of the node.
|
void |
setParent(TreeNode<T> parent)
Set the parent node.
|
void |
setProperty(String name,
Object value)
Set a property on the node.
|
public TreeNode<T> getParent()
TreeNodepublic Collection<TreeNode<T>> getChildren()
TreeNodegetChildren in interface TreeNode<T>public T getObject()
TreeNodepublic void setName(String name)
TreeNodepublic String getName()
TreeNodepublic void setParent(TreeNode<T> parent)
TreeNodepublic TreeNode<T> addChild(T child, String name)
TreeNodepublic TreeNode<T> addChild(TreeNode<T> child)
TreeNodepublic TreeNode<T> removeChild(String name)
TreeNoderemoveChild in interface TreeNode<T>name - name of child to removepublic void setProperty(String name, Object value)
TreeNodesetProperty in interface TreeNode<T>name - the name of the propertyvalue - the value of the propertypublic Object getProperty(String name)
TreeNodegetProperty in interface TreeNode<T>name - property namepublic String getStringProperty(String name)
TreeNodegetStringProperty in interface TreeNode<T>name - property namepublic void removeProperty(String name)
TreeNoderemoveProperty in interface TreeNode<T>name - name of property to be removedCopyright © 2022 Apache Software Foundation. All rights reserved.