public abstract class Command extends Object
Modifier and Type | Method and Description |
---|---|
abstract void |
execute(String parameter)
Executes this command with the given parameter.
|
String |
getDescription()
Returns a short description of this command.
|
String |
getDocumentation()
Returns a documentation of the usage of this command.
|
String |
getKey()
Returns the command key of this command.
|
abstract boolean |
matchesParameter(String line)
Returns
true if and only if the string line is
a valid parameter for this command. |
public abstract boolean matchesParameter(String line)
true
if and only if the string line
is
a valid parameter for this command.line
- the input stringtrue
if line
is a valid parameter,
false
otherwisepublic abstract void execute(String parameter)
parameter
- the parameter passed to the commandpublic String getKey()
public String getDescription()
public String getDocumentation()