|
2 | 2 |
|
3 | 3 | /** |
4 | 4 | * |
5 | | - * An adapter helps two incompatible interfaces to work together. This is the real |
6 | | - * world definition for an adapter. Interfaces may be incompatible but the inner |
7 | | - * functionality should suit the need. The Adapter design pattern allows otherwise |
8 | | - * incompatible classes to work together by converting the interface of one class |
9 | | - * into an interface expected by the clients. |
| 5 | + * An adapter helps two incompatible interfaces to work together. This is the real world definition |
| 6 | + * for an adapter. Interfaces may be incompatible but the inner functionality should suit the need. |
| 7 | + * The Adapter design pattern allows otherwise incompatible classes to work together by converting |
| 8 | + * the interface of one class into an interface expected by the clients. |
10 | 9 | * <p> |
11 | | - * There are two variations of the Adapter pattern: The class adapter implements |
12 | | - * the adaptee's interface whereas the object adapter uses composition to |
13 | | - * contain the adaptee in the adapter object. This example uses the object |
14 | | - * adapter approach. |
| 10 | + * There are two variations of the Adapter pattern: The class adapter implements the adaptee's |
| 11 | + * interface whereas the object adapter uses composition to contain the adaptee in the adapter |
| 12 | + * object. This example uses the object adapter approach. |
15 | 13 | * <p> |
16 | | - * The Adapter ({@link GnomeEngineer}) converts the interface of the target class |
17 | | - * ({@link GoblinGlider}) into a suitable one expected by the client |
18 | | - * ({@link GnomeEngineeringManager}). |
| 14 | + * The Adapter ({@link GnomeEngineer}) converts the interface of the target class ( |
| 15 | + * {@link GoblinGlider}) into a suitable one expected by the client ({@link GnomeEngineeringManager} |
| 16 | + * ). |
19 | 17 | * |
20 | 18 | */ |
21 | 19 | public class App { |
22 | 20 |
|
23 | | - /** |
24 | | - * Program entry point |
25 | | - * @param args command line args |
26 | | - */ |
27 | | - public static void main(String[] args) { |
28 | | - Engineer manager = new GnomeEngineeringManager(); |
29 | | - manager.operateDevice(); |
30 | | - } |
| 21 | + /** |
| 22 | + * Program entry point |
| 23 | + * |
| 24 | + * @param args command line args |
| 25 | + */ |
| 26 | + public static void main(String[] args) { |
| 27 | + Engineer manager = new GnomeEngineeringManager(); |
| 28 | + manager.operateDevice(); |
| 29 | + } |
31 | 30 | } |
0 commit comments