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:
“It is difficult even to choose the adjective
For this blank cold, this sadness without cause.
The great structure has become a minor house.
No turban walks across the lessened floors.
The greenhouse never so badly needed paint.”
—Wallace Stevens (18791955)
“... the structure of our public morality crashed to earth. Above its grave a tombstone read, Be toleranteven of evil. Logically the next step would be to say to our commonwealths criminals, I disagree that its all right to rob and murder, but naturally I respect your opinion. Tolerance is only complacence when it makes no distinction between right and wrong.”
—Sarah Patton Boyle, U.S. civil rights activist and author. The Desegregated Heart, part 2, ch. 2 (1962)
“... the structure of a page of good prose is, analyzed logically, not something frozen but the vibrating of a bridge, which changes with every step one takes on it.”
—Robert Musil (18801942)