java.lang.Object
de.elnarion.util.plantuml.generator.sequencediagram.internal.TreeNode<E,F>
Type Parameters:
E - the value type of the tree data structure

public class TreeNode<E,F> extends Object
Simple tree data structure.
  • Constructor Details

    • TreeNode

      public TreeNode(E paramKey, F paramValue)
      Standard constructor for tree nodes.
      Parameters:
      paramKey - the key of the tree node
      paramValue - the value of the tree node
  • Method Details

    • addChildNode

      public void addChildNode(TreeNode<E,F> paramChild)
      Add a leaf to the tree.
      Parameters:
      paramChild - the child node of the tree aka leaf
    • getValue

      public F getValue()
      Get the value of this tree node
      Returns:
      F the value
    • getKey

      public E getKey()
      Get the key of this tree node
      Returns:
      E the key
    • getParents

      public List<TreeNode<E,F>> getParents()
      Retrieve all parents of the current tree node/leaf to the root of the tree. If this is the root of the tree the list is empty.
      Returns:
      List the parent tree node objects as list
    • getAllChildNodes

      public List<TreeNode<E,F>> getAllChildNodes()