Class ImmutableTreeNode<T extends TreeNode<T>>

java.lang.Object
org.parboiled.trees.ImmutableGraphNode<T>
org.parboiled.trees.ImmutableTreeNode<T>
Type Parameters:
T - the actual implementation type of this ImmutableTreeNode
All Implemented Interfaces:
GraphNode<T>, TreeNode<T>
Direct Known Subclasses:
ImmutableBinaryTreeNode

public class ImmutableTreeNode<T extends TreeNode<T>> extends ImmutableGraphNode<T> implements TreeNode<T>
An ImmutableGraphNode specialization representing a tree node with a parent field linking back to the nodes (only) parent.
  • Constructor Details

    • ImmutableTreeNode

      public ImmutableTreeNode()
    • ImmutableTreeNode

      public ImmutableTreeNode(List<T> children)
  • Method Details

    • getParent

      public T getParent()
      Description copied from interface: TreeNode
      Returns the parent node or null if this node is the root.
      Specified by:
      getParent in interface TreeNode<T extends TreeNode<T>>
      Returns:
      the parent node