Iterator

This is a class diagram example for the Iterator design pattern.

Purpose

Allows for access to the elements of an aggregate object without allowing access to its underlying representation.

Use When

  • Access to elements is needed without access to the entire representation.
  • Multiple or concurrent traversals of the elements are needed.
  • A uniform interface for traversal is needed.
  • Subtle differences exist between the implementation details of various iterators.
Import into your Project

Posted by: Willie Gonzalez