The Adapter pattern అనేది incompatible interfaces ఉన్న objects లను కలిసి పని చేయడానికి అనుమతిస్తుంది, ఒకటిని మరొకటి ఆశించిన interface తో కప్పి ఉంచడం ద్వారా. ఇది రెండు interfaces మధ్య ఒక అనువాదకుడిగా పనిచేస్తుంది, ఇది ఇప్పటికే ఉన్న కోడ్ను సవరించకుండా ఏకీకరణను ఎనేబల్ చేస్తుంది.
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
