3.6 Composite

The composite pattern allows you to create a single common type in your application that you can then use to create complex hierarchical structures (for example, trees). The composite pattern, moreover, makes it simple to work with the elements of these structures, by defining a uniform interface for accessing them.