From f7c2cad971253cea9cefa24b60bf0ea315f8ff07 Mon Sep 17 00:00:00 2001 From: Ilkka Seppala Date: Sun, 7 Sep 2014 15:20:27 +0300 Subject: [PATCH] Added explanation about class adapter vs. object adapter in the adapter example. --- adapter/src/main/java/com/iluwatar/App.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/adapter/src/main/java/com/iluwatar/App.java b/adapter/src/main/java/com/iluwatar/App.java index f1c87c6e5..41e2495a9 100644 --- a/adapter/src/main/java/com/iluwatar/App.java +++ b/adapter/src/main/java/com/iluwatar/App.java @@ -2,8 +2,14 @@ package com.iluwatar; /** * - * Adapter (GnomeEngineer) converts the interface of the - * target class (GoblinGlider) into suitable one expected + * 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). * */