© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
V. SarcarJava Design Patternshttps://doi.org/10.1007/978-1-4842-7971-7_14

14. Bridge Pattern

Vaskaran Sarcar1  
(1)
Garia, Kolkata, India
 

This chapter covers the Bridge pattern. You’ll see two different implementations.

GoF Definition

It decouples an abstraction from its implementation so that the two can vary independently.

Concept

This pattern is also known as the Handle/Body pattern. Using it, you decouple an implementation class from an abstract class by providing a bridge between them.

This bridge interface makes the functionality of concrete classes independent from the interface implementer classes. You can alter different kinds of classes structurally without ...

Get Java Design Patterns: A Hands-On Experience with Real-World Examples now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.