Adapter pattern umožňuje objektům s nekompatibilními rozhraními pracovat spolu tím, že obalí jeden z nich rozhraním, které očekává druhý. Funguje jako překladatel mezi dvěma rozhraními, což umožňuje integraci bez nutnosti měnit existující kód.
Co Adapter pattern dělá
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
