layout | title | folder | permalink | pumlid | categories | tags | ||
---|---|---|---|---|---|---|---|---|
pattern |
Value Object |
value-object |
/patterns/value-object/ |
LSZ13SCm20NGLTe1RExTXX2KECBOmfza_VRQszDxDnVBNJFiTG9pVOY2dteqdBdbqf3XK4ULqQbPFWmEklZcikjgXvV9W8Olwhn-e9ijjOpjKW4fv2zgHgypktq1 |
Creational |
|
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.
Use the Value Object when
- you need to measure the objects' equality based on the objects' value