Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
Define:
A Null Object is an object with defined neutral ("null") behaviour. The Null Object design pattern describes the uses of such objects and their behaviour (or lack thereof).

Usage:
When the handling of nulls should be abstracted from the client.
When an object requires a collaborator 

Examples Implementations:
A Null strategy pattern when we don't want work to actually be done by the strategy executor
A Null command object we want the command to execute nothing.
A factory method when we could not determine what object to instantiate