Interface Visitable<T>

Type Parameters:
T - The type of value wrapped in this visitable object. For example, if the visitable class is ImmutableTreeNode, then the type of value is the return type of its ImmutableTreeNode.getValue() method
All Known Subinterfaces:
TreeNode<T>
All Known Implementing Classes:
ImmutableTreeNode, MutableTreeNode
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 interface Visitable<T>
Represents the 'Element' participant in the Visitor pattern.

Any class that implements this interface can be "visited" by a Visitor object.

This is a functional interface whose functional method is accept(Visitor).

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(Visitor<T> visitor)
    The entry point for the visitor to perform its operations on this object.
  • Method Details

    • accept

      void accept(Visitor<T> visitor)
      The entry point for the visitor to perform its operations on this object.
      Parameters:
      visitor - The visitor that will process this visitable object.