Skip to content

Latest commit

 

History

History

value-object

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
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