mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-17 00:59:11 +00:00
083065ba93
Added index.md with explanation which seems a little bit short of detail. Fixed the directory of the files.
1.1 KiB
1.1 KiB
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.
Applicability
Use the Value Object when
- you need to measure the objects' equality based on the objects' value
