Files
java-design-patterns/composite/index.md
T
Markus fbb12b53ba Work towards #56: Splitting up the README
I did the job and splitted up the readme, hopefully everything was
splitted correctly...
2015-08-13 23:54:40 +02:00

1.2 KiB

layout, title, folder, categories, tags
layout title folder categories tags
pattern Composite composite pattern_cat pattern_tag

Intent: Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.

alt text

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

Real world examples: