Iterator Pattern

Overview

Provide a way to access the elements on an aggregate object sequentially without exposing its underlying representation.

Participants

Iterator

ConcreteIteration (optional)

Aggregate

ConcreteAggregate

Parameters

Next method

hasMore method

Create Pattern Links

Applicability

Use the Iterator pattern