mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-13 04:15:07 +00:00
Comments for command example.
This commit is contained in:
1 parent
6b843f028a
commit
52ca001a7a
2 files changed
+12
No files matched your search
@@ -1,5 +1,12 @@
|
|||||||
package com.iluwatar;
|
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.
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class App
|
public class App
|
||||||
{
|
{
|
||||||
public static void main( String[] args )
|
public static void main( String[] args )
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
package com.iluwatar;
|
package com.iluwatar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Interface for spells.
|
||||||
|
*
|
||||||
|
*/
|
||||||
public abstract class Command {
|
public abstract class Command {
|
||||||
|
|
||||||
public abstract void execute(Target target);
|
public abstract void execute(Target target);
|
||||||
|
|||||||
Reference in new issue
Block a user