File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 37
37
* [ Model-View-Presenter] ( #model-view-presenter )
38
38
* [ Double Checked Locking] ( #double-checked-locking )
39
39
* [ Servant] ( #servant )
40
+ * [ Null Object] ( #null-object )
40
41
41
42
## <a name =" abstract-factory " >Abstract Factory</a > [ ↑ ; ] ( #list-of-design-patterns )
42
43
** Intent:** Provide an interface for creating families of related or dependent objects without specifying their concrete classes.
382
383
** Applicability:** Use the Servant pattern when
383
384
* When we want some objects to perform a common action and don't want to define this action as a method in every class.
384
385
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
+
385
394
386
395
# Frequently asked questions
387
396
You can’t perform that action at this time.
0 commit comments