Skip to content

Commit d46e560

Browse files
committed
Update README.md
1 parent 8f3dc6a commit d46e560

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,13 @@
169169
##Mediator
170170
**Intent:** Define an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicitly, and it lets you vary their interaction independently.
171171

172+
![alt text](https://github.com/iluwatar/java-design-patterns/blob/master/mediator/etc/mediator.jpg "Mediator")
173+
174+
**Applicability:** Use the Mediator pattern when
175+
* a set of objects communicate in well-defined but complex ways. The resulting interdependencies are unstructured and difficult to understand
176+
* reusing an object is difficult because it refers to and communicates with many other objects
177+
* a behavior that's distributed between several classes should be customizable without a lot of subclassing
178+
172179
##Memento
173180
**Intent:** Without violating encapsulation, capture and externalize an object's internal state so that the object can be restored to this state later.
174181

0 commit comments

Comments
 (0)