Link Details

Link 17064 thumbnail
User 111696 avatar

By bloid
via groovy.codehaus.org
Published: Mar 27 2007 / 14:33

The visitor pattern is of these known, but not often used patterns. I think this is strange, as it is really a nice thing. What is it used for? Basically it used to iterate over a tree structure where each node might be of a different type and an iterator has to react to these types different.
  • 12
  • 0
  • 1110
  • 233

Comments

Add your comment
User 179375 avatar

Ricky Clarkson replied ago:

0 votes Vote down Vote up Reply

This post is made too complicated for the concept it's demonstrating, simply by assuming that Visitor is only for trees. It doesn't necessarily need to involve collections of any type at all.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (12)



Voters Against This Link (0)