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