Iterator Design Pattern
Nov 1 · 1 min read

Iterator design pattern falls into the category of behavioral pattern. Iterator pattern is used to provide iteration structure to traverse the sequential elements of objects. In collections, the iterator interface provides the methods to traverse the elements of collection.
According to GoF, iterator provides a way to traverse the elements of aggregate object without exposing its underlying implementation to the client.

