Top "Visitor-pattern" questions

The visitor design pattern is a way of separating an algorithm from an object structure on which it operates.

When should I use the Visitor Design Pattern?

I keep seeing references to the visitor pattern in blogs but I've got to admit, I just don't get it. …

design-patterns visitor-pattern
What is the difference between Strategy pattern and Visitor Pattern?

I have trouble understanding these two design patterns. Can you please give me contextual information or an example so I …

oop design-patterns strategy-pattern visitor-pattern
Implementing visitor Pattern in C#

I'm new in this pattern , could please someone help me in it? I got an Object like this : public class …

c# visitor-pattern
How does double dispatch work in Visitor pattern?

I was looking into other questions related to the visitor pattern but couldn't understand the implementation of double dispatch in …

java design-patterns visitor-pattern double-dispatch
Java Enums - Switch statements vs Visitor Pattern on Enums - Performance benefits?

I have been searching around for days to find an answer to this performance based issue. After digging the Internet …

java enums performance switch-statement visitor-pattern
What is Single and Double Dispatch?

i have wrote the visitor pattern as follow but i don't understand what is single and double dispatch. AFAIK, single …

c++ design-patterns visitor-pattern double-dispatch
Visitor pattern implementation in java- How does this look?

Alrite, I am gonna jump straight to the code: public interface Visitor { public void visitInventory(); public void visitMaxCount(); public void …

java visitor-pattern
How to implement visitor pattern in javascript?

As far as I understand, visitor pattern is often used to add methods to some hierarchy structure. But I still …

javascript design-patterns visitor-pattern