This chapter reviews five well-known design patternsVisitor, Interpreter, Function, Strategy, and Subject-Observerand shows how they can take advantage of generics. The Function pattern generalizes the idea behind the Comparator interface. The other four patterns are described in the seminal book Design Patterns, by Gamma, Helm, Johnson, and Vlissides (Addison-Wesley). |