Vzorec Adapter omogoča objektom z nezdružljivimi vmesniki, da delujejo skupaj z oblikovanjem enega z vmesnikom, ki ga pričakuje drugi. Deluje kot prevajalec med dvema vmesnikoma, kar omogoča integracijo brez spreminjanja obstoječega koda.
Kaj naredi Adapter pattern
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
