Package Structural.Adapter
Class Adapter
java.lang.Object
Structural.Adapter.Adapter
- All Implemented Interfaces:
Target
The Adapter class makes the Adaptee compatible with the Target interface.
The Adapter implements the Target interface and translates calls from the client
to the Adaptee's methods. This enables the client to work seamlessly with Adaptee
without being aware of its specific implementation.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Adapter
Constructs the Adapter with an Adaptee instance.- Parameters:
adaptee- The Adaptee instance to adapt.- Throws:
IllegalArgumentException- if the adaptee is null.
-
-
Method Details