|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.parboiled.trees.MutableTreeNodeImpl<T>
T - the actual implementation type of this MutableTreeNodeImplpublic class MutableTreeNodeImpl<T extends MutableTreeNode<T>>
A base implementation of the MutableTreeNode.
| Constructor Summary | |
|---|---|
MutableTreeNodeImpl()
|
|
| Method Summary | |
|---|---|
void |
addChild(int index,
T child)
Adds the given child to this nodes children list and setting the childs parent field to this node. |
java.util.List<T> |
getChildren()
Returns the sub nodes of this node. |
T |
getParent()
Returns the parent node or null if this node is the root. |
T |
removeChild(int index)
Removes the child with the given index. |
void |
setChild(int index,
T child)
Sets the child node at the given index to the given node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MutableTreeNodeImpl()
| Method Detail |
|---|
public T getParent()
TreeNode
getParent in interface TreeNode<T extends MutableTreeNode<T>>public java.util.List<T> getChildren()
GraphNode
getChildren in interface GraphNode<T extends MutableTreeNode<T>>
public void addChild(int index,
T child)
MutableTreeNode
addChild in interface MutableTreeNode<T extends MutableTreeNode<T>>index - the index under which to insert this child into the children listchild - the child node to add
public void setChild(int index,
T child)
MutableTreeNode
setChild in interface MutableTreeNode<T extends MutableTreeNode<T>>index - the index under which to set this child into the children listchild - the child node to setpublic T removeChild(int index)
MutableTreeNode
removeChild in interface MutableTreeNode<T extends MutableTreeNode<T>>index - the index of the child to remove.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||