mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-17 04:59:21 +00:00
Improved the adapter pattern example. Updated the class diagram.
This commit is contained in:
@@ -2,21 +2,20 @@ package com.iluwatar;
|
||||
|
||||
/**
|
||||
*
|
||||
* Adaptee class.
|
||||
* Device class (adaptee in the pattern).
|
||||
*
|
||||
*/
|
||||
public class GoblinGlider {
|
||||
|
||||
public void attachGlider() {
|
||||
System.out.println("glider attached");
|
||||
System.out.println("Glider attached.");
|
||||
}
|
||||
|
||||
public void gainSpeed() {
|
||||
System.out.println("gaining speed");
|
||||
System.out.println("Gaining speed.");
|
||||
}
|
||||
|
||||
public void takeOff() {
|
||||
System.out.println("lift-off!");
|
||||
System.out.println("Lift-off!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user