Паттерн Adapter позволяет объектам с несовместимыми интерфейсами работать вместе, оборачивая один объект интерфейсом, который ожидает другой. Он служит переводчиком между двумя интерфейсами, обеспечивая интеграцию без изменения существующего кода.
Что делает паттерн Adapter
ADAPTER → convert one interface into another that a client expects (a "translator"):
→ wrap an object whose interface is INCOMPATIBLE, exposing the interface the client needs
→ the adapter translates calls/data between the two interfaces
→ makes incompatible things work together WITHOUT changing either's code
