Replacing conditionals (if obj == null {...} else {...}) with polymorpism.
Replaces a null with a null-object to avoid if statements.
Also can represent a null-behaviour (for instance when collecting a power-up in a game,
that doesn't allow the player to move for x number of seconds).
Files
NullObjectPattern
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||