Adapter पैटर्न असंगत interfaces वाले ऑब्जेक्ट्स को साथ काम करने देता है, एक को उस interface के साथ wrap करके जिसकी दूसरे को अपेक्षा होती है। यह दो interfaces के बीच अनुवादक की तरह काम करता है, मौजूदा कोड को संशोधित किए बिना एकीकरण को सक्षम करता है।
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
