public abstract class ConsoleCommand
extends java.lang.Object
| Constructor and Description |
|---|
ConsoleCommand() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkNumberArguments(int numberOfArguments)
Checks if the given number of arguments abides to the command's specification
|
abstract java.lang.String |
getCommandName()
The name that the user must use to invoke the command
|
abstract int |
getNumberArguments()
Obtain the command's number of mandatory arguments
|
abstract int |
getNumberOptionalArguments()
Obtain the command's number of optional arguments
|
abstract void |
run(java.util.List<java.lang.String> arguments)
The implementation of the command
|
abstract java.lang.String |
usage()
A string representation of the command's usage.
|
public abstract java.lang.String getCommandName()
public abstract void run(java.util.List<java.lang.String> arguments)
arguments - List of arguments that the command receivespublic abstract int getNumberArguments()
public abstract int getNumberOptionalArguments()
public abstract java.lang.String usage()
help command.public boolean checkNumberArguments(int numberOfArguments)
numberOfArguments - Number of arguments to check