T
- Object's type in the tree.public class Tree<T> extends Object
Modifier and Type | Method and Description |
---|---|
Tree<T> |
addLeaf(T leaf) |
void |
addLeaf(T root,
T leaf) |
T |
getHead() |
Tree<T> |
getParent() |
Collection<Tree<T>> |
getSubTrees() |
Collection<T> |
getSuccessors(T root) |
static <T> Collection<T> |
getSuccessors(T of,
Collection<Tree<T>> in) |
Tree<T> |
getTree(T element) |
Tree<T> |
setAsParent(T parentRoot) |
String |
toString() |
public Tree(T head)
public T getHead()
public Collection<T> getSuccessors(T root)
public Collection<Tree<T>> getSubTrees()
public static <T> Collection<T> getSuccessors(T of, Collection<Tree<T>> in)
Copyright © 2016. All rights reserved.