mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-03 05:20:09 +00:00
Comments for adapter example.
This commit is contained in:
1 parent
54b414acb1
commit
c5b57c86bd
3 files changed
+16
No files matched your search
@@ -1,5 +1,11 @@
|
||||
package com.iluwatar;
|
||||
|
||||
/**
|
||||
*
|
||||
* Adapter (GnomeEngineerAdapter) converts the interface of the
|
||||
* target class (GoblinGlider) into suitable one.
|
||||
*
|
||||
*/
|
||||
public class App
|
||||
{
|
||||
public static void main( String[] args )
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
package com.iluwatar;
|
||||
|
||||
/**
|
||||
*
|
||||
* Adapter class.
|
||||
*
|
||||
*/
|
||||
public class GnomeEngineerAdapter {
|
||||
|
||||
private GoblinGlider glider;
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
package com.iluwatar;
|
||||
|
||||
/**
|
||||
*
|
||||
* Adaptee class.
|
||||
*
|
||||
*/
|
||||
public class GoblinGlider {
|
||||
|
||||
public void attachGlider() {
|
||||
|
||||
Reference in new issue
Block a user