T - the type of accepted itemsS - the type of tree groupU - the type of tree leafpublic abstract class AbstractTree<T,S extends TreeGroup,U extends TreeLeaf> extends java.lang.Object implements Tree<T>
| Constructor and Description |
|---|
AbstractTree(S root,
TreeClassifier<T> treeClassifier,
TreeGroupFactory<T,S> groupFactory,
TreeLeafFactory<T,S,U> leafFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(T item) |
void |
addChild(TreeNode node) |
java.util.List<TreeNode> |
getChildren() |
protected java.util.stream.Stream<S> |
getEndNodes(T item,
S node,
java.util.List<TreeLayer> classifiers,
int index) |
java.lang.String |
getName() |
protected abstract java.lang.Class<S> |
getRootType() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindNodeOfTypepublic AbstractTree(S root, TreeClassifier<T> treeClassifier, TreeGroupFactory<T,S> groupFactory, TreeLeafFactory<T,S,U> leafFactory)
protected java.util.stream.Stream<S> getEndNodes(T item, S node, java.util.List<TreeLayer> classifiers, int index)
public java.util.List<TreeNode> getChildren()
getChildren in interface TreeGroupprotected abstract java.lang.Class<S> getRootType()