Interface Tree.TreeVisitor<T>

Type Parameters:
T - The tree data type.
Enclosing class:
Tree<T>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface Tree.TreeVisitor<T>
Interface for tree traversal implementations.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    visitNode(Tree<T> node)
    Called when the visitor arrives at a new node.
  • Method Details

    • visitNode

      boolean visitNode(Tree<T> node)
      Called when the visitor arrives at a new node.
      Parameters:
      node - The node visited.
      Returns:
      True if this search should be stopped.