docs: add diagrams for identity map, intercepting filter, interpreter, iterator

This commit is contained in:
Ilkka Seppälä
2025-04-06 21:11:20 +03:00
parent 9d23a234bb
commit d8b07ac484
7 changed files with 12 additions and 4 deletions
+4
View File
@@ -35,6 +35,10 @@ Wikipedia says
> In object-oriented programming, the iterator pattern is a design pattern in which an iterator is used to traverse a container and access the container's elements.
Sequence diagram
![Iterator sequence diagram](./etc/iterator-sequence-diagram.png)
## Programmatic Example of Iterator Pattern in Java
The main class in our Java Iterator Design Pattern example is the `TreasureChest` that contains items. This demonstrates how to implement and use iterators for efficient collection traversal in Java.
Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB