Improved Command pattern code comments.
This commit is contained in:
@ -2,8 +2,9 @@ package com.iluwatar;
|
||||
|
||||
/**
|
||||
*
|
||||
* In Command pattern actions are objects that can be executed and undone. The
|
||||
* commands in this example are spells cast by the wizard on the goblin.
|
||||
* In Command pattern actions are objects that can be executed and undone.
|
||||
*
|
||||
* In this example the commands are the spells cast by the wizard on the goblin.
|
||||
*
|
||||
*/
|
||||
public class App {
|
||||
|
@ -2,7 +2,7 @@ package com.iluwatar;
|
||||
|
||||
/**
|
||||
*
|
||||
* Interface for spells.
|
||||
* Interface for Commands.
|
||||
*
|
||||
*/
|
||||
public abstract class Command {
|
||||
|
@ -1,5 +1,10 @@
|
||||
package com.iluwatar;
|
||||
|
||||
/**
|
||||
*
|
||||
* Enumeration for target size.
|
||||
*
|
||||
*/
|
||||
public enum Size {
|
||||
|
||||
SMALL, NORMAL, LARGE;
|
||||
@ -24,5 +29,4 @@ public enum Size {
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,10 @@
|
||||
package com.iluwatar;
|
||||
|
||||
/**
|
||||
*
|
||||
* Base class for spell targets.
|
||||
*
|
||||
*/
|
||||
public abstract class Target {
|
||||
|
||||
private Size size;
|
||||
|
@ -1,5 +1,10 @@
|
||||
package com.iluwatar;
|
||||
|
||||
/**
|
||||
*
|
||||
* Enumeration for target visibility.
|
||||
*
|
||||
*/
|
||||
public enum Visibility {
|
||||
|
||||
VISIBLE, INVISIBLE;
|
||||
|
Reference in New Issue
Block a user