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

Commitc723289

Browse files
authored
Merge pull requestiluwatar#723 from Juaanma/patch-1
Captain is implementing RowingBoat - Adapter pattern
2 parents477da92 +87cb33f commitc723289

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

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

Lines changed: 1 addition & 2 deletions
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

@@ -40,7 +40,6 @@ public void setRowingBoat(RowingBoat rowingBoat) {
4040
this.rowingBoat =rowingBoat;
4141
}
4242

43-
@Override
4443
publicvoidrow() {
4544
rowingBoat.row();
4645
}

‎adapter/src/test/java/com/iluwatar/adapter/AdapterPatternTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public void setup() {
6666
*/
6767
@Test
6868
publicvoidtestAdapter() {
69-
RowingBoatcaptain = (RowingBoat)beans.get(ROWING_BEAN);
69+
Captaincaptain = (Captain)beans.get(ROWING_BEAN);
7070

7171
// when captain moves
7272
captain.row();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp