* Use lombok, reformat, and optimize the code * Fix merge conflicts and some sonar issues Co-authored-by: va1m <va1m@email.com>
layout, title, folder, permalink, categories, tags
layout | title | folder | permalink | categories | tags | |
---|---|---|---|---|---|---|
pattern | Value Object | value-object | /patterns/value-object/ | Creational |
|
Intent
Provide objects which follow value semantics rather than reference semantics. This means value objects' equality are not based on identity. Two value objects are equal when they have the same value, not necessarily being the same object.
Class diagram
Applicability
Use the Value Object when
- You need to measure the objects' equality based on the objects' value