A design pattern that allows incompatible interfaces to work together by creating a wrapper that translates one interface into another expected by the client. It acts as a bridge between two incompatible systems without modifying their existing code.
Named after electrical adapters that allow devices with different plugs to connect to power outlets, first formalized in the Gang of Four book (1994). The pattern addresses the common problem of integrating legacy systems or third-party libraries with different interfaces.
The Adapter pattern is exactly like a travel power adapter - it lets your American laptop plug into European outlets without changing either the laptop or the building's wiring! In code, this means you can use a new payment API with your existing checkout system by creating an adapter that translates between their different method names and data formats.
Complete word intelligence in one call. Free tier — 50 lookups/day.