Skip to content

Commit

Permalink
docs: update parameter object
Browse files Browse the repository at this point in the history
  • Loading branch information
iluwatar committed May 27, 2024
1 parent 15b916a commit 3a569a6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions parameter-object/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,18 @@ 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.
* There is a need to reduce the complexity of method signatures.
* 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.
Expand Down Expand Up @@ -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)

0 comments on commit 3a569a6

Please sign in to comment.