First page Back Continue Last page Overview Graphics
Consequences
- Separation of data structure from traversal
- Multiple concurrent traversals
- Current position recorded in each iterator, not in the aggregate
- Multiple traversal orders
- Traversal algorithm reusable
- Simplifies interface of Aggregate
- Moves First(), Next(), IsDone() etc. to Iterator class