Structure
- Component
- is the abstraction for all components, including composite ones
- declares the interface for objects in the composition
- (optional) defines an interface for accessing a component's parent in the recursive structure, and implements it if that's appropriate
- Leaf
- represents leaf objects in the composition .
- implements all Component methods
- Composite
- represents a composite Component (component having children)
- implements methods to manipulate children
- implements all Component methods, generally by delegating them to its children
Read more about this topic: Composite Pattern
Famous quotes containing the word structure:
“The philosopher believes that the value of his philosophy lies in its totality, in its structure: posterity discovers it in the stones with which he built and with which other structures are subsequently built that are frequently betterand so, in the fact that that structure can be demolished and yet still possess value as material.”
—Friedrich Nietzsche (18441900)
“One theme links together these new proposals for family policythe idea that the family is exceedingly durable. Changes in structure and function and individual roles are not to be confused with the collapse of the family. Families remain more important in the lives of children than other institutions. Family ties are stronger and more vital than many of us imagine in the perennial atmosphere of crisis surrounding the subject.”
—Joseph Featherstone (20th century)
“The syntactic component of a grammar must specify, for each sentence, a deep structure that determines its semantic interpretation and a surface structure that determines its phonetic interpretation.”
—Noam Chomsky (b. 1928)