| Modifier and Type | Field and Description |
|---|---|
protected Tree<T> |
delegate |
protected java.util.function.BiPredicate<T,T> |
nodeComparator |
protected T |
root |
| Constructor and Description |
|---|
SubTree(Tree<T> delegate,
T root) |
SubTree(Tree<T> delegate,
T root,
java.util.function.BiPredicate<T,T> nodeComparator) |
| Modifier and Type | Method and Description |
|---|---|
T |
copy(T node,
List<T> children)
Copies a given node thereby setting the provided children as its children.
|
Tree<T> |
createNew(T root) |
Collection<T> |
getChildren(T node) |
T |
getParent(T node) |
T |
getRoot() |
protected T root
protected java.util.function.BiPredicate<T,T> nodeComparator
public T getRoot()
public Collection<T> getChildren(T node)
public T copy(T node, List<T> children)
TreeCopyright © 2018. All rights reserved.