From 074725c7264324cf8d649df7cf9861d959fd251c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilkka=20Sepp=C3=A4l=C3=A4?= Date: Sun, 24 Aug 2014 11:43:12 +0300 Subject: [PATCH] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 73f9ca66a..1aaa186d6 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,12 @@ ##Composite **Intent:** Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly. +![alt text](https://github.com/iluwatar/java-design-patterns/blob/master/composite/etc/composite.jpg "Composite") + +**Applicability:** Use the Composite pattern when +* you want to represent part-whole hierarchies of objects +* you want clients to be able to ignore the difference between compositions of objects and individual objects. Clients will treat all objects in the composite structure uniformly + ##Decorator **Intent:** Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.