Skip to content

Commit 2af53ce

Browse files
committed
Added Javadoc to strategy pattern interfaces and implmentation
1 parent ede37bd commit 2af53ce

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

strategy/src/main/java/com/iluwatar/strategy/DragonSlayingStrategy.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@
2626

2727
/** Strategy interface. */
2828
@FunctionalInterface
29+
/**
30+
* Strategy interface for slaying a dragon.
31+
*/
2932
public interface DragonSlayingStrategy {
30-
33+
/**
34+
* Execute the dragon slaying strategy.
35+
*/
3136
void execute();
3237
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828

2929
/** Melee strategy. */
3030
@Slf4j
31+
/**
32+
* A strategy where the dragon is slain using a melee weapon (sword).
33+
*/
3134
public class MeleeStrategy implements DragonSlayingStrategy {
3235

3336
@Override

0 commit comments

Comments
 (0)