Skip to content

Commit 22ca6fe

Browse files
committed
Improved Command pattern code comments.
1 parent 74b4330 commit 22ca6fe

File tree

5 files changed

+19
-4
lines changed

5 files changed

+19
-4
lines changed

command/src/main/java/com/iluwatar/App.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
/**
44
*
5-
* In Command pattern actions are objects that can be executed and undone. The
6-
* commands in this example are spells cast by the wizard on the goblin.
5+
* In Command pattern actions are objects that can be executed and undone.
6+
*
7+
* In this example the commands are the spells cast by the wizard on the goblin.
78
*
89
*/
910
public class App {

command/src/main/java/com/iluwatar/Command.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
*
5-
* Interface for spells.
5+
* Interface for Commands.
66
*
77
*/
88
public abstract class Command {

command/src/main/java/com/iluwatar/Size.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
package com.iluwatar;
22

3+
/**
4+
*
5+
* Enumeration for target size.
6+
*
7+
*/
38
public enum Size {
49

510
SMALL, NORMAL, LARGE;
@@ -24,5 +29,4 @@ public String toString() {
2429
}
2530
return s;
2631
}
27-
2832
}

command/src/main/java/com/iluwatar/Target.java

Lines 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+
* Base class for spell targets.
6+
*
7+
*/
38
public abstract class Target {
49

510
private Size size;

command/src/main/java/com/iluwatar/Visibility.java

Lines 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+
* Enumeration for target visibility.
6+
*
7+
*/
38
public enum Visibility {
49

510
VISIBLE, INVISIBLE;

0 commit comments

Comments
 (0)