Interface ITreeNode<T extends ITreeNode<T>>

Type Parameters:
T - the type of the node: a subtype of ITreeNode.
All Known Implementing Classes:
AbstractNode, BooleanNode, DoubleNode, IntNode, ListNode, LongNode, MapNode, NodeType, NullNode, StringNode

public interface ITreeNode<T extends ITreeNode<T>>
This interface defines the methods that must be implemented by a node of a tree that can be used with the methods of TreeUtils.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a list of the children of this node.
    Returns the parent of this node.
    default boolean
    Returns true if this node is a leaf node (ie, it has no children).
  • Method Details

    • getParent

      T getParent()
      Returns the parent of this node.
      Returns:
      the parent of this node.
    • getChildren

      List<T> getChildren()
      Returns a list of the children of this node.
      Returns:
      a list of the children of this node.
    • isLeaf

      default boolean isLeaf()
      Returns true if this node is a leaf node (ie, it has no children).
      Returns:
      true if this node is a leaf node.