Skip to content

Latest commit

 

History

History
14 lines (9 loc) · 574 Bytes

README.md

File metadata and controls

14 lines (9 loc) · 574 Bytes

Null Object

Null Object pattern can be used to replaces check of NULL object instance. Instead of putting if check for a null value, Null Object reflects a do nothing relationship.

base

For example, we will make a User object where the user can be null. If the user is null and they want to buy, then it will not be executed.

example

Source