In software engineering, the composite pattern is a partitioning design pattern. The composite pattern describes a group of objects that are treated the same way as a single instance of the same type of object.
Composite patterns allow clients to treat individual objects (under a hierarchical structure) in a uniform manner. The composite pattern is most suitable for working with objects that form a tree-like hierarchy.