public class ScenarioCommand extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
E_INV_PARAMS |
protected String |
error |
protected String |
params |
protected CommandType |
type |
Constructor and Description |
---|
ScenarioCommand(CommandType type,
String params)
Constructs a scenario command.
|
Modifier and Type | Method and Description |
---|---|
static ScenarioCommand |
create(CommandType type,
String params)
Returns a command encapsulating the given parameters.
|
CommandType |
getType()
Returns the command type.
|
String |
toString() |
String |
validate()
Validates the command; returns null if all is well, or a short
string describing the problem.
|
protected static final String E_INV_PARAMS
protected final CommandType type
protected final String params
protected String error
public ScenarioCommand(CommandType type, String params)
type
- the command typeparams
- the command parameterspublic CommandType getType()
public String validate()
public static ScenarioCommand create(CommandType type, String params)
type
- the command typeparams
- the parametersCopyright © 2015. All Rights Reserved.