Iterator

Provide a way to access the elements of an aggregate object sequentially without
exposing it underlying representation. (See also STL
Iterators for an example of iterator use with template containers.)
Applicability
- Need to access an aggregate object's contents without exposing its internal
representation
- Need to support multiple traversals of aggregate objects
- Need to provide a uniform interface for traversing different aggregate structures
Consequences
- Supports variation in the traversal of an aggregate
- Simplifies the Aggregate interface
- More than one traversal can be pending on an aggregate