April 2004
Intermediate to advanced
520 pages
10h 10m
English
This pattern was previously described in GoF95.
Every component or object can be classified into one of the two categories — Individual Components or Composite Components — which are composed of individual components or other composite components. The Composite pattern is useful in designing a common interface for both individual and composite components so that client programs can view both the individual components and groups of components uniformly. In other words, the Composite design pattern allows a client object to treat both single components and collections of components in an identical manner.
This can also be explained in terms of a tree structure. The Composite pattern allows uniform reference to both Nonterminal ...