Class LabeledTree<K, X extends LabeledNode<K>>

java.lang.Object
org.aksw.commons.collections.trees.LabeledTree<K,X>
All Implemented Interfaces:
Tree<K>

public class LabeledTree<K, X extends LabeledNode<K>> extends Object implements Tree<K>
  • Field Details

  • Constructor Details

    • LabeledTree

      public LabeledTree()
    • LabeledTree

      public LabeledTree(K root, ReversibleMap<K,K> childToParent)
  • Method Details

    • getRoot

      public K getRoot()
      Specified by:
      getRoot in interface Tree<K>
    • getNode

      public X getNode(K key)
    • getChildren

      public Collection<K> getChildren(K node)
      Specified by:
      getChildren in interface Tree<K>
    • getParent

      public K getParent(K node)
      Specified by:
      getParent in interface Tree<K>
    • deleteNode

      public X deleteNode(K node)
    • copy

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

      public Tree<K> createNew(K root)
      Specified by:
      createNew in interface Tree<K>
    • nodeCount

      public long nodeCount()
      Specified by:
      nodeCount in interface Tree<K>
    • toString

      public String toString()
      Overrides:
      toString in class Object