Chapter 10. The Bridge Pattern

At first sight, the Bridge pattern looks much like the Adapter pattern in that a class is used to convert one kind of interface to another. However, the Adapter pattern is intended to make one or more classes' interfaces look the same as that of a particular class. By contrast, the Bridge pattern is designed to separate a class's interface from its implementation so that you can vary or replace the implementation without changing the client code.

The participants in the Bridge pattern are

  • the Abstraction, which defines the class's interface,

  • the Refined Abstraction, which extends and implements that interface,

  • the Implementor, which defines the interface for the implementation classes, and

  • the ConcreteImplementors, which ...

Get Java™ Design Patterns: A Tutorial now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.