Composite
The book has now been published and the content of this chapter has likely changed substanstially.An object that hides whether there are one or many objects.
Compose objects into tree structures to represent whole-part hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.
A Composite implements the same interface as a single object and holds a collection of objects over which it iterates calling the same method as was called on itself.
From [GOF].
Copyright © 2003-2008 Gerard Meszaros all rights reserved