Adapter
Usage
- Also known as: Wrapper
- Match interfaces of different classes
- Convert the interface of a class into another interface clients expect
- Let classes work together that couldn't otherwise because of incompatible interfaces
Participants
Target
Adapter
- Defines the domain-specific interface that Client uses.
Adaptee
- Adapts the interface Adaptee to the Target interface.
Client
- Defines an existing interface that needs adapting.
- Collaborates with objects conforming to the Target interface.
