mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-14 08:58:26 +00:00
docs: update parameter object
This commit is contained in:
@@ -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
|
||||
|
||||

|
||||
|
||||
## 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.
|
||||
* It’s 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, Java’s 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)
|
||||
|
||||
Reference in New Issue
Block a user