Skip to content

Glossary: Software Design Patterns in Java

Iterator

Also written: Iterable, hasNext, for-each

An object that steps through a collection one item at a time without showing how it's stored. Every for-each loop uses one.

Where the book teaches it