Files
java-design-patterns/adapter/src/main/java/com/iluwatar/App.java

24 lines
663 B
Java
Raw Normal View History

2014-08-11 22:07:16 +03:00
package com.iluwatar;
2014-08-31 08:46:10 +03:00
/**
*
* There are two variations of the Adapter pattern: The
* class adapter implements the adaptee's interface whereas
* the object adapter uses composition to contain the adaptee
* in the adapter object. This example uses the object adapter
* approach.
*
* The Adapter (GnomeEngineer) converts the interface of the
* target class (GoblinGlider) into a suitable one expected
* by the client (GnomeEngineeringManager).
2014-08-31 08:46:10 +03:00
*
*/
2014-08-11 22:07:16 +03:00
public class App
{
public static void main( String[] args )
{
GnomeEngineeringManager manager = new GnomeEngineeringManager();
manager.operateDevice();
2014-08-11 22:07:16 +03:00
}
}