java.lang.Object
it.polimi.ingsw.am13.PromptCommand
Representation of a command accepted from the command line
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
command
Command key from the command line (comprehensive of the '--') -
description
Short description of the command -
parameterList
List of parameters needed, in form of text. The list can be used to check how many parameters must be present for this command (optional parameters are not supported) -
action
Action corresponding to the command. The argument is the possible list of arguments for that command
-
-
Constructor Details
-
PromptCommand
-
-
Method Details
-
getCommand
- Returns:
- Command key from the command line (comprehensive of the '--')
-
getParameterList
- Returns:
- List of parameters needed, in form of text. The list can be used to check how many parameters must be present for this command
-
executeAction
- Throws:
IllegalArgumentException
-
generateHelpString
- Returns:
- A formatted string representing the command
-