Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit696ed86

Browse files
authored
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.
1 parente01d640 commit696ed86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎adapter/src/main/java/com/iluwatar/adapter/Captain.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* The Captain uses {@link RowingBoat} to sail. <br>
2727
* This is the client in the pattern.
2828
*/
29-
publicclassCaptainimplementsRowingBoat{
29+
publicclassCaptain {
3030

3131
privateRowingBoatrowingBoat;
3232

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp