Composite Pattern - Structure

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:

    Each structure and institution here was so primitive that you could at once refer it to its source; but our buildings commonly suggest neither their origin nor their purpose.
    Henry David Thoreau (1817–1862)

    In the extent and proper structure of the Union, therefore, we behold a republican remedy for the diseases most incident to republican government.
    James Madison (1751–1836)

    Just as a new scientific discovery manifests something that was already latent in the order of nature, and at the same time is logically related to the total structure of the existing science, so the new poem manifests something that was already latent in the order of words.
    Northrop Frye (b. 1912)