* "visitor" pattern: Use local variable type inference Update "visitor" pattern with local variable type inference. * "value-object" pattern: Use local variable type inference Update "value-object" pattern with local variable type inference. * "unit-of-work" pattern: Use local variable type inference Update "value-object" pattern with local variable type inference. * "typeobjectpattern" pattern: Use local variable type inference Update "value-object" pattern with local variable type inference.
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