docs: update parameter object

This commit is contained in:
Ilkka Seppälä
2024-05-27 07:23:04 +03:00
parent 15b916a838
commit 3a569a691d
+5 -5
View File
@@ -127,10 +127,6 @@ public class App {
This example demonstrates how the Parameter Object pattern can simplify method signatures and make the code more maintainable. It also shows how the pattern can be combined with the Builder pattern to make object creation more flexible and readable.
## Class diagram
![Parameter Object](./etc/parameter-object.png "Parameter Object")
## Applicability
* Methods require multiple parameters that logically belong together.
@@ -138,6 +134,11 @@ This example demonstrates how the Parameter Object pattern can simplify method s
* The parameters may need to evolve over time, adding more properties without breaking existing method signatures.
* Its beneficial to pass data through a method chain.
## Tutorials
* [Does Java have default parameters? (Daniel Olszewski)](http://dolszewski.com/java/java-default-parameters)
## Known Uses
* Java Libraries: Many Java frameworks and libraries use this pattern. For example, Javas java.util.Calendar class has various methods where parameter objects are used to represent date and time components.
@@ -165,7 +166,6 @@ Trade-offs:
## Credits
* [Does Java have default parameters? - Daniel Olszewski](http://dolszewski.com/java/java-default-parameters)
* [Design Patterns: Elements of Reusable Object-Oriented Software](https://amzn.to/3w0pvKI)
* [Effective Java](https://amzn.to/4cGk2Jz)
* [Refactoring: Improving the Design of Existing Code](https://amzn.to/3TVEgaB)