Head First Design Patterns - Composite Pattern

The Composite Pattern allows you to compose objects into tree structures to represent part-whole

hierarchies.Composite lets clients treat individual objects and compositions of objects uniformly.

The Composite Pattern allows us to build structures of objects  in the form of trees that contain both

compositions of objects and individual objects as nodes.

Using a composite structure, we can apply the same operations over both composites and individual

objects. In other words., in most cases we can ignore the differences between compositions of objects

and individual objects.

posted @ 2012-05-03 20:48  qiangzhu  阅读(464)  评论(0编辑  收藏  举报