docs: object pool and observer diagrams

This commit is contained in:
Ilkka Seppälä
2025-04-09 21:31:30 +03:00
parent 6bae409380
commit 2aaf712f06
4 changed files with 8 additions and 0 deletions
+4
View File
@@ -33,6 +33,10 @@ Wikipedia says
> The observer pattern is a software design pattern in which an object, called the subject, maintains a list of its dependents, called observers, and notifies them automatically of any state changes, usually by calling one of their methods.
Sequence diagram
![Observer sequence diagram](./etc/observer-sequence-diagram.png)
## Programmatic Example of Observer Pattern in Java
In a land far away live the races of hobbits and orcs. Both of them are mostly outdoors, so they closely follow the weather changes. One could say that they are constantly observing the weather.
Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB