File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
iterator/src/main/java/com/iluwatar/iterator Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 22
33/**
44 *
5- * Iterator ({@link ItemIterator}) adds abstraction layer on top of a collection
6- * ({@link TreasureChest}). This way the collection can change its internal
7- * implementation without affecting its clients.
5+ * The Iterator pattern is a design pattern in which an iterator is used to
6+ * traverse a container and access the container's elements. The Iterator pattern
7+ * decouples algorithms from containers.
8+ * <p>
9+ * In this example the Iterator ({@link ItemIterator}) adds abstraction layer on
10+ * top of a collection ({@link TreasureChest}). This way the collection can change
11+ * its internal implementation without affecting its clients.
812 *
913 */
1014public class App {
You can’t perform that action at this time.
0 commit comments