es.ucm.fdi.hysteria.console.command
Class ConnectCommand
java.lang.Object
es.ucm.fdi.hysteria.console.command.Command
es.ucm.fdi.hysteria.console.command.ConnectCommand
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class ConnectCommand
- extends Command
- See Also:
- Serialized Form
Method Summary |
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 java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ConnectCommand
public ConnectCommand(Game theGame,
Engine theEngine)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
ConnectCommand
public ConnectCommand(Game theGame,
Engine theEngine,
java.util.Properties theConfig)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
getHelp
public java.lang.String getHelp()
- Description copied from class:
Command
- Creates a string with the information about the command.
- Specified by:
getHelp
in class Command
- Returns:
- How to write this command
execute
public boolean execute()
- Description copied from class:
Command
- Executes the command.
- Overrides:
execute
in class Command
parse
public boolean parse(java.lang.String line)
- Description copied from class:
Command
- Tries to configure the command with the information contained in a string.
- Specified by:
parse
in class Command
- Parameters:
line
- Order to parse
- Returns:
- Successfulness of the parse
toString
public java.lang.String toString()
- Specified by:
toString
in class Command