| Modifier | Constructor and Description |
|---|---|
protected |
Node(T value)
Creates a new node.
|
protected |
Node(T value,
Node<T> parent)
Creates a new node.
|
| Modifier and Type | Method and Description |
|---|---|
Node |
addChild(T value)
Adds a child to this node
|
Set<T> |
flatten()
Give a set of values in the tree.
|
List<Node<T>> |
getChildren()
Access the node's child nodes
|
T |
getValue()
Access the node's value
|
boolean |
hasAncestor(T value)
Check if the node has an ancestor that represents the given value
|
protected void |
write(PrintWriter writer,
Tree.Converter<T> converter,
boolean... indents) |
protected Node(T value)
addChild(Object) methodvalue - the node valueprotected Node(T value, Node<T> parent)
addChild(Object) methodvalue - the node valuepublic T getValue()
public Node addChild(T value)
value - the child's valuepublic boolean hasAncestor(T value)
value - the node valuetrue it there's an ancestor that represents the valueprotected void write(PrintWriter writer, Tree.Converter<T> converter, boolean... indents)
Copyright © 2007-2014 FuseSource, Corp.. All Rights Reserved.