Comments for adapter example.
This commit is contained in:
@ -1,5 +1,11 @@
|
|||||||
package com.iluwatar;
|
package com.iluwatar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Adapter (GnomeEngineerAdapter) converts the interface of the
|
||||||
|
* target class (GoblinGlider) into suitable one.
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class App
|
public class App
|
||||||
{
|
{
|
||||||
public static void main( String[] args )
|
public static void main( String[] args )
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
package com.iluwatar;
|
package com.iluwatar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Adapter class.
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class GnomeEngineerAdapter {
|
public class GnomeEngineerAdapter {
|
||||||
|
|
||||||
private GoblinGlider glider;
|
private GoblinGlider glider;
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
package com.iluwatar;
|
package com.iluwatar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Adaptee class.
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class GoblinGlider {
|
public class GoblinGlider {
|
||||||
|
|
||||||
public void attachGlider() {
|
public void attachGlider() {
|
||||||
|
Reference in New Issue
Block a user