X Tutup
Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 1.11 KB

File metadata and controls

34 lines (26 loc) · 1.11 KB
layout pattern
title Value Object
folder value-object
permalink /patterns/value-object/
categories Creational
tags
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

X Tutup