Official description of the Visitor pattern
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.
This pattern is used when you want to add capabilities to a composite of objects and encapsulation is not important.