Class TreeImpl<T>

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

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

  • Constructor Details

  • Method Details

    • createNew

      public Tree<T> createNew(T root)
    • getRoot

      public T getRoot()
    • getChildren

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

      public T getParent(T node)
    • create

      public static <T> TreeImpl<T> create(T root, Function<T,List<T>> parentToChildren)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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