From 696ed86affe8e04a681d05077877f3f5b8191f09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Su=C3=A1rez?= Date: Wed, 7 Mar 2018 00:19:33 -0300 Subject: [PATCH] Captain is implementing RowingBoat - Adapter pattern Captain and RowingBoat aren't interchangable. Captain, as a client, may have a method to use the boat, but it isn't needed that they share the same interface, as it makes the code more confusing. --- adapter/src/main/java/com/iluwatar/adapter/Captain.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adapter/src/main/java/com/iluwatar/adapter/Captain.java b/adapter/src/main/java/com/iluwatar/adapter/Captain.java index 369016980..29140cfdc 100644 --- a/adapter/src/main/java/com/iluwatar/adapter/Captain.java +++ b/adapter/src/main/java/com/iluwatar/adapter/Captain.java @@ -26,7 +26,7 @@ package com.iluwatar.adapter; * The Captain uses {@link RowingBoat} to sail.
* This is the client in the pattern. */ -public class Captain implements RowingBoat { +public class Captain { private RowingBoat rowingBoat;