When do you decide to use a visitors for your objects?

Posted by kunjaan on Stack Overflow See other posts from Stack Overflow or by kunjaan
Published on 2010-05-12T00:57:03Z Indexed on 2010/05/12 1:04 UTC
Read the original article Hit count: 231

I always thought a method needs to be packed with the data. When would you want a method that is extrinsic to the object? What rule of thumb do you follow to have a visitor? This is supposing that you have full control of the object graph?

© Stack Overflow or respective owner

Related posts about java

Related posts about visitor-pattern