|
|||||||||
| 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.TakeCommand
public class TakeCommand
| Field Summary | |
|---|---|
protected java.lang.String |
_itemName
The name of the item to be picked |
| Fields inherited from class es.ucm.fdi.hysteria.console.command.Command |
|---|
_config, _executed, _game, _parsed, _result, _successful |
| Constructor Summary | |
|---|---|
TakeCommand(Game theGame)
PickCommand constructor. |
|
TakeCommand(Game theGame,
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 java.lang.String _itemName
| Constructor Detail |
|---|
public TakeCommand(Game theGame)
throws java.lang.IllegalArgumentException
theGame - Reference to main Game
java.lang.IllegalArgumentException
public TakeCommand(Game theGame,
java.util.Properties config)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException| Method Detail |
|---|
public boolean execute()
throws UnparsedCommandException
Command
execute in class CommandUnparsedCommandExceptionpublic java.lang.String getHelp()
Command
getHelp in class Commandpublic boolean parse(java.lang.String line)
Command
parse in class Commandline - Order to parse
public java.lang.String toString()
toString in class Commandpublic 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 | ||||||||