| Package | Description |
|---|---|
| javatools.datatypes |
| Modifier and Type | Field and Description |
|---|---|
protected Tree<T> |
Tree.parent
Points to the parent
|
| Modifier and Type | Field and Description |
|---|---|
protected List<Tree<T>> |
Tree.children
Holds the children
|
| Modifier and Type | Method and Description |
|---|---|
Tree<T> |
Tree.getParent()
Returns the parent
|
| Modifier and Type | Method and Description |
|---|---|
List<Tree<T>> |
Tree.getChildren()
Depth first search across the tree
|
| Modifier and Type | Method and Description |
|---|---|
void |
Tree.addChild(Tree<T> child)
Adds a child
|
void |
Tree.setParent(Tree<T> parent)
Sets the parent
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
Tree.receive(Visitor<Tree<T>> visitor)
Receives a visitor for a depth first traversal
|
void |
Tree.setChildren(List<Tree<T>> children)
Sets the children
|
| Constructor and Description |
|---|
Tree(Tree<T> parent,
T element)
Constructs a tree with a node element and a parent
|
Tree(Tree<T> parent,
T element,
List<Tree<T>> children)
Constructs a tree with a node element and a parent
|
| Constructor and Description |
|---|
Tree(T element,
List<Tree<T>> children)
Constructs a tree with a node element and children
|
Tree(Tree<T> parent,
T element,
List<Tree<T>> children)
Constructs a tree with a node element and a parent
|
Copyright © 2018. All rights reserved.