2017-11-28 20:55:52 +02:00
..
2017-11-28 20:55:52 +02:00
2016-11-27 14:34:20 +02:00

layout, title, folder, permalink, pumlid, categories, tags
layout title folder permalink pumlid categories tags
pattern Value Object value-object /patterns/value-object/ LSZ13SCm20NGLTe1RExTXX2KECBOmfza_VRQszDxDnVBNJFiTG9pVOY2dteqdBdbqf3XK4ULqQbPFWmEklZcikjgXvV9W8Olwhn-e9ijjOpjKW4fv2zgHgypktq1 Creational
Java
Difficulty-Beginner

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.

alt text

Applicability

Use the Value Object when

  • you need to measure the objects' equality based on the objects' value

Real world examples

Credits