Modeli Adapter lejon objektet me ndërfaqe të papajtueshme të punojnë së bashku duke mbështjellë njërin me ndërfaqen që tjetri pret. Ai vepron si përkthyes midis dy ndërfaqeve, duke mundësuar integrimin pa modifikuar kodin ekzistues.
Çfarë bën modeli 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
