Class SubTree<T>

java.lang.Object
org.aksw.commons.collections.trees.TreeBase<T>
org.aksw.commons.collections.trees.SubTree<T>
All Implemented Interfaces:
Tree<T>

public class SubTree<T> extends TreeBase<T>
  • Field Details

    • root

      protected T root
    • delegate

      protected Tree<T> delegate
    • nodeComparator

      protected BiPredicate<T,T> nodeComparator
  • Constructor Details

    • SubTree

      public SubTree(Tree<T> delegate, T root)
    • SubTree

      public SubTree(Tree<T> delegate, T root, BiPredicate<T,T> nodeComparator)
  • Method Details

    • getRoot

      public T getRoot()
    • getChildren

      public Collection<T> getChildren(T node)
    • getParent

      public T getParent(T node)
    • copy

      public T copy(T node, List<T> children)
      Description copied from interface: Tree
      Copies a given node thereby setting the provided children as its children.
      Returns:
      A copy of the given node with the children set appropriately
    • createNew

      public Tree<T> createNew(T root)