Adapter: The Interpreter Between Two Strangers

When the hub's routines are written in three brands' words (setPower, release, startStream), every new brand edits every routine; an adapter is a small class that keeps the hub's own promise and passes each call on in the brand's words, so the hub never learns a brand's language.

By

Updated

Cheat sheet: Adapter: The Interpreter Between Two Strangers
Category
Data Structures
Level
Apprentice
Tags
Adapter Pattern, Interface, OOP, Polymorphism