|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectwyvern.lib.commands.ApplyCommand
Command to apply something.
| Method Summary | |
void |
addCommands(java.util.Map commands,
CommandList list)
Tells the Command to add the commands that it wants to implement into the passed data structure. |
CommandEvent |
createEvent(CommandEvent initial)
Implements Command.createEvent() |
boolean |
execute(CommandEvent e)
Executes the specified CommandEvent. |
static ApplyCommand |
getImpl()
|
boolean |
knowsCommand(java.lang.String command)
Returns true if this Command wants to handle the command. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static ApplyCommand getImpl()
public void addCommands(java.util.Map commands,
CommandList list)
BuiltInCommand
addCommands in interface BuiltInCommandcommands - a Map whose keys are commands, and whose values
are Commands that handle those commands.list - the CommandList the Command is being added to.public boolean knowsCommand(java.lang.String command)
CommandThis method exists to allow more than one game object to implement the same command verb, but with different expected arguments.
If two objects register for the same command and the same arguments, the object that was registered most recently gets to handle at the command.
knowsCommand in interface Commandcommand - the entire command string, including arguments
public CommandEvent createEvent(CommandEvent initial)
createEvent in interface Commandinitial - the initial, raw event
public boolean execute(CommandEvent e)
Command
execute in interface Commande - the CommandEvent to execute
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||