Design Pattern
  • Introduction
  • What is singleton?
  • factory method design pattern
  • loose coupling VS tight coupling
  • Proxy pattern
  • abstracFactory
  • OOA & OOD
  • Decorator Design Pattern
  • Iterator Design Pattern
  • The Observer Pattern
  • Spring Singleton VS Java Singleton
Powered by GitBook
On this page
  • 1. Intent
  • 2. Problem

Was this helpful?

Iterator Design Pattern

1. Intent

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

  • The C++ and Java standard library abstraction that makes it possible to decouple collection classes and algorithms.

  • Promote to "full object status" the traversal of a collection

  • Polymorphic traversal

2. Problem

Need to "abstract" the traversal of wildly different data structures so that algorithms can be defined that are capable of interfacing with each transparently.

PreviousDecorator Design PatternNextThe Observer Pattern

Last updated 5 years ago

Was this helpful?