Advertisement

Composites

  • Edward Sciore
Chapter

Abstract

This chapter studies composite objects, which are similar to a decorators except that they wrap multiple objects. This seemingly small distinction makes a big difference in the structure of a composite and how it is used. Composite objects correspond to trees and composite methods tend to involve tree traversals. This chapter presents three examples of composites: predicates, graphical user interfaces, and cookbook recipes. These examples share a common class design known as the composite pattern. They also have some functional differences that illustrate the different choices a designer faces.

Copyright information

© Edward Sciore 2019

Authors and Affiliations

  • Edward Sciore
    • 1
  1. 1.NewtonUSA

Personalised recommendations