Sunday, November 4, 2012

Iterator Design Pattern

The Iterator design pattern illustration, UML ...The Iterator design pattern illustration, UML diagram. (Photo credit: Wikipedia)
The iterator pattern is used to access objects that are stored in many different types of collection.
This is done by creating a common interface that all the different collection classes share. Then an iterator is provided to traverse the objects they contain.

Because all different Collection classes share a common interface they can be treated polymorphically and it eliminate duplicate code.


Below is the video tutorial for the Iterator pattern


No comments:

Post a Comment