File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 3737* [ Model-View-Presenter] ( #model-view-presenter )
3838* [ Double Checked Locking] ( #double-checked-locking )
3939* [ Servant] ( #servant )
40+ * [ Null Object] ( #null-object )
4041
4142## <a name =" abstract-factory " >Abstract Factory</a > [ ↑ ; ] ( #list-of-design-patterns )
4243** Intent:** Provide an interface for creating families of related or dependent objects without specifying their concrete classes.
382383** Applicability:** Use the Servant pattern when
383384* When we want some objects to perform a common action and don't want to define this action as a method in every class.
384385
386+ ## <a name =" null-object " >Null Object</a > [ ↑ ; ] ( #list-of-design-patterns )
387+ ** Intent:** Null Object is used instead of null values to simplify algorithm and avoid explicit null checking.
388+
389+ ![ alt text] ( https://github.com/iluwatar/java-design-patterns/blob/master/null-object/etc/test.png " Null Object ")
390+
391+ ** Applicability:** Use the Null Object pattern when
392+ * You want to avoid explicit null checks and keep algorithm elegant and easy to read.
393+
385394
386395# Frequently asked questions
387396
You can’t perform that action at this time.
0 commit comments