Interface Tree<T>

Type Parameters:
T -
All Known Implementing Classes:
LabeledTree, SubTree, TreeBase, TreeDirect, TreeImpl, TreeReplace

public interface Tree<T>
Maybe a tree is an IndirectTree<K, K>, so that each node represents itself?
Author:
raven
  • Method Details

    • getRoot

      T getRoot()
    • getChildren

      Collection<T> getChildren(T node)
    • getParent

      T getParent(T node)
    • copy

      T copy(T node, List<T> children)
      Copies a given node thereby setting the provided children as its children.
      Parameters:
      node -
      children -
      Returns:
      A copy of the given node with the children set appropriately
    • createNew

      Tree<T> createNew(T root)
    • nodeCount

      long nodeCount()