Skip to content

Commit 0b5a6bd

Browse files
committed
Edited iterator
1 parent 00cac2f commit 0b5a6bd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

iterator/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Iterator Design Pattern
22

33
An interface with **next** and **has_next** methods.
4+
45
**next** returns the next object in the aggregate(collection, list)
6+
57
**has_next** returns a value, usually a boolean indicating if the iterable is at the end of the list or not.
68

79
The benefits of using the Iterator pattern is that the client, can traverse an aggregate without needing to understand it's internal representation

0 commit comments

Comments
 (0)