T
- The type of node the tree can holdpublic interface TreeNode<T> extends Iterable<TreeNode<T>>, Serializable
Modifier and Type | Method and Description |
---|---|
void |
addChild(TreeNode<T> tn)
Add a child node.
|
List<TreeNode<T>> |
getChildren()
Get all children
|
T |
getValue() |
boolean |
isLeaf()
Does this tree node contain no children
|
Iterator<TreeNode<T>> |
iterator() |
void |
removeChild(TreeNode<T> tn)
Remove a child node (if it exists)
|
void |
setValue(T obj)
Set the node value
|
forEach, spliterator
void removeChild(TreeNode<T> tn)
tn
- the child node to removeList<TreeNode<T>> getChildren()
boolean isLeaf()