Class LaunchCommandRequest
java.lang.Object
za.co.wethinkcode.robots.client.commands.ClientCommandRequest
za.co.wethinkcode.robots.client.commands.LaunchCommandRequest
-
Field Summary
Fields inherited from class za.co.wethinkcode.robots.client.commands.ClientCommandRequest
command -
Constructor Summary
ConstructorsConstructorDescriptionLaunchCommandRequest(String robotName, String[] arguments) public constructor for a robot. -
Method Summary
Modifier and TypeMethodDescriptionString[]Getter for a string array based on the map of an argumentsAbstract method for childClasses to define their expected argument syntaxGetter for the client commandgetRobot()Getter for the kind of robot being launchedStandard getter for robotNamevoidsetArguments(String[] arguments) Setter for all the arguments of a launch command from a string arrayvoid
-
Constructor Details
-
LaunchCommandRequest
public constructor for a robot. rarely used in practice- Parameters:
robotName- name of the robot being launchedarguments- arguments for the function- Throws:
ParsingFailedException
-
-
Method Details
-
getArgumentsMap
Abstract method for childClasses to define their expected argument syntax- Specified by:
getArgumentsMapin classClientCommandRequest- Returns:
- Map of Strings corresponding to the type of argument and a value corresponding to its type.
-
getArguments
Getter for a string array based on the map of an arguments- Overrides:
getArgumentsin classClientCommandRequest- Returns:
- a string array of arguments
-
getRobotKind
Getter for the kind of robot being launched- Returns:
- the kind of robot being asked to be launched
-
setArguments
Setter for all the arguments of a launch command from a string array- Parameters:
arguments- the arguments coming in- Throws:
ParsingFailedException
-
setRobot
-
getRobot
-
getRobotName
Standard getter for robotName- Overrides:
getRobotNamein classClientCommandRequest- Returns:
- the name of the robot
-
getCommand
Getter for the client command- Overrides:
getCommandin classClientCommandRequest- Returns:
- the command that this is
-