The Composite pattern is a design pattern that allows a group of objects to be treated in the same way as a single instance of an object. It is one of the Gang of Four's structural design patterns.
Overview
The Composite pattern is a design pattern that allows a group of objects to be treated in the same way as a single instance of an object.
It is one of the Gang of Four's structural design-patterns, first published in Gamma et al.'s book "Design Patterns: Elements of Reusable Object-Oriented Software".
The Composite pattern may sometimes coincide with the use of composite data types compositetype and composite variables.