Interface Visitor<T>
- Type Parameters:
T- The type of value wrapped in this visitable object. For example, if the visitable class isImmutableTreeNode, then the type of value is the return type of itsImmutableTreeNode.getValue()method
- All Known Implementing Classes:
AbstractInOrderTraversalVisitor, AbstractPostOrderTraversalVisitor, AbstractPreOrderTraversalVisitor
public interface Visitor<T>
Represents the 'Visitor' participant in the Visitor pattern.
It declares a set of visiting methods for each concrete 'Visitable' element.
-
Method Summary
Modifier and TypeMethodDescriptionvoidvisit(ImmutableTreeNode<T> node) Visits anImmutableTreeNode.voidvisit(MutableTreeNode<T> node) Visits aMutableTreeNode.
-
Method Details
-
visit
Visits anImmutableTreeNode.- Parameters:
node- The ImmutableTreeNode to visit.
-
visit
Visits aMutableTreeNode.- Parameters:
node- The MutableTreeNode to visit.
-