Iterator Pattern
Noun · Development
Definitions
A design pattern that provides a standard way to traverse elements of a collection without exposing the collection's internal representation. It separates traversal logic from the container itself, allowing clients to consume arrays, trees, or streams through a common interface such as next().
In plain English: It is a structured way to step through items in a collection without needing to know how the collection is built inside.
Example: "Expose an iterator pattern here so callers can stream rows without knowing whether the source is memory, disk, or Kafka."