Update README.md

This commit is contained in:
Ilkka Seppälä 2014-08-24 19:17:45 +03:00
parent ff82d13cda
commit 10216f2ec9

View File

@ -86,6 +86,13 @@
##Decorator
**Intent:** Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.
![alt text](https://github.com/iluwatar/java-design-patterns/blob/master/decorator/etc/decorator.jpg "Decorator")
**Applicability:** Use Decorator
* to add responsibilities to individual objects dynamically and transparently, that is, without affecting other objects
* for responsibilities that can be withdrawn
* when extension by subclassing is impractical. Sometimes a large number of independent extensions are possible and would produce an explosion of sublasses to support every combination. Or a class definition may be hidden or otherwise unavailable for subclassing
##Facade
**Intent:** Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use.