|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.ucm.fdi.hysteria.console.command.Command
es.ucm.fdi.hysteria.console.command.HelpCommand
public class HelpCommand
Field Summary | |
---|---|
protected Command |
_com
The command whose help is going to be printed |
protected Parser |
_parser
The parser in order to delegate it the task of creating the help message |
Fields inherited from class es.ucm.fdi.hysteria.console.command.Command |
---|
_config, _executed, _game, _parsed, _result, _successful |
Constructor Summary | |
---|---|
HelpCommand(Game theGame,
Parser theParser)
HelpCommand constructor. |
|
HelpCommand(Game theGame,
Parser theParser,
java.util.Properties config)
|
Method Summary | |
---|---|
java.lang.Object |
clone()
Returns a clone of this command. |
boolean |
execute()
Executes the command. |
java.lang.String |
getHelp()
Creates a string with the information about the command. |
boolean |
parse(java.lang.String line)
Tries to configure the command with the information contained in a string. |
java.lang.String |
toString()
|
Methods inherited from class es.ucm.fdi.hysteria.console.command.Command |
---|
getResult, hasResult, setConfig, setGame |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Parser _parser
protected Command _com
Constructor Detail |
---|
public HelpCommand(Game theGame, Parser theParser) throws java.lang.IllegalArgumentException
theGame
- Reference to main Game
java.lang.IllegalArgumentException
public HelpCommand(Game theGame, Parser theParser, java.util.Properties config) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
Method Detail |
---|
public boolean execute() throws UnparsedCommandException
Command
execute
in class Command
UnparsedCommandException
public java.lang.String getHelp()
Command
getHelp
in class Command
public boolean parse(java.lang.String line)
Command
parse
in class Command
line
- Order to parse
public java.lang.String toString()
toString
in class Command
public java.lang.Object clone()
Command
clone
in class Command
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |