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

Appearance settings

Commit 9916530

Browse filesBrowse files
committed
Improved comments for strategy pattern sample.
1 parent 27a2759 commit 9916530
Copy full SHA for 9916530

4 files changed

+16-1Lines changed: 16 additions & 1 deletion

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎strategy/src/main/java/com/iluwatar/App.java‎

Copy file name to clipboardExpand all lines: strategy/src/main/java/com/iluwatar/App.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
*
5-
* Strategy (DragonSlayingStrategy) encapsulates the algorithm to use. The
5+
* Strategy (DragonSlayingStrategy) encapsulates an algorithm. The containing
66
* object (DragonSlayer) can alter its behavior by changing its strategy.
77
*
88
*/
Collapse file

‎strategy/src/main/java/com/iluwatar/MeleeStrategy.java‎

Copy file name to clipboardExpand all lines: strategy/src/main/java/com/iluwatar/MeleeStrategy.java
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
package com.iluwatar;
22

3+
/**
4+
*
5+
* Melee strategy.
6+
*
7+
*/
38
public class MeleeStrategy implements DragonSlayingStrategy {
49

510
@Override
Collapse file

‎strategy/src/main/java/com/iluwatar/ProjectileStrategy.java‎

Copy file name to clipboardExpand all lines: strategy/src/main/java/com/iluwatar/ProjectileStrategy.java
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
package com.iluwatar;
22

3+
/**
4+
*
5+
* Projectile strategy.
6+
*
7+
*/
38
public class ProjectileStrategy implements DragonSlayingStrategy {
49

510
@Override
Collapse file

‎strategy/src/main/java/com/iluwatar/SpellStrategy.java‎

Copy file name to clipboardExpand all lines: strategy/src/main/java/com/iluwatar/SpellStrategy.java
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
package com.iluwatar;
22

3+
/**
4+
*
5+
* Spell strategy.
6+
*
7+
*/
38
public class SpellStrategy implements DragonSlayingStrategy {
49

510
@Override

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.