Visitor Pattern

Overview

Represent an operation to be performed on the elements of an object structure. Visitor lets you define a new operation without changing the classes of the elements on which it operates.

Participants

Abstract Visitor

Concrete Visitor

Abstract Element

Concrete Element

Parameters

Create Pattern Links

Applicability

Use the Visitor pattern when