Skip to content

Commit 10216f2

Browse files
committed
Update README.md
1 parent ff82d13 commit 10216f2

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
@@ -86,6 +86,13 @@
8686
##Decorator
8787
**Intent:** Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.
8888

89+
![alt text](https://github.com/iluwatar/java-design-patterns/blob/master/decorator/etc/decorator.jpg "Decorator")
90+
91+
**Applicability:** Use Decorator
92+
* to add responsibilities to individual objects dynamically and transparently, that is, without affecting other objects
93+
* for responsibilities that can be withdrawn
94+
* 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
95+
8996
##Facade
9097
**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.
9198

0 commit comments

Comments
 (0)