Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about Iterator Pattern ?

 
Haroldo Nascimento
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Multiple iterators can retraversal the same collection simultaneously ?
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes. That's the point of iterators.
Some old designs build the traversal into the collection itself, but that limits it to only one client iterating through it at once.
 
Haroldo Nascimento
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can say that:
Does Iterator design pattern suport traversing the same collection in diferente order ?
and
Does Iterator design pattern performance task to each object in the collection ?
thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic