docs: null object diagram

This commit is contained in:
Ilkka Seppälä
2025-04-09 21:30:44 +03:00
parent f01235b30a
commit 7ed9e393f0
2 changed files with 4 additions and 0 deletions
+4
View File
@@ -35,6 +35,10 @@ Wikipedia says
> In object-oriented computer programming, a null object is an object with no referenced value or with defined neutral ("null") behavior. The null object design pattern describes the uses of such objects and their behavior (or lack thereof).
Sequence diagram
![Null Object sequence diagram](./etc/null-object-sequence-diagram.png)
## Programmatic Example of Null Object in Java
By implementing the Null Object Pattern, Java developers can ensure that their applications handle 'empty' objects more gracefully, enhancing code stability and readability.
Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB