From d46e560a247ed151e6c5cba7b29c3c0d247dfd87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilkka=20Sepp=C3=A4l=C3=A4?= Date: Sun, 24 Aug 2014 22:43:38 +0300 Subject: [PATCH] Update README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 089f66166..1f17ae712 100644 --- a/README.md +++ b/README.md @@ -169,6 +169,13 @@ ##Mediator **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. +![alt text](https://github.com/iluwatar/java-design-patterns/blob/master/mediator/etc/mediator.jpg "Mediator") + +**Applicability:** Use the Mediator pattern when +* a set of objects communicate in well-defined but complex ways. The resulting interdependencies are unstructured and difficult to understand +* reusing an object is difficult because it refers to and communicates with many other objects +* a behavior that's distributed between several classes should be customizable without a lot of subclassing + ##Memento **Intent:** Without violating encapsulation, capture and externalize an object's internal state so that the object can be restored to this state later. -- GitLab