Class LaunchCommandRequest

java.lang.Object
za.co.wethinkcode.robots.client.commands.ClientCommandRequest
za.co.wethinkcode.robots.client.commands.LaunchCommandRequest

public class LaunchCommandRequest extends ClientCommandRequest
  • Constructor Details

    • LaunchCommandRequest

      public LaunchCommandRequest(String robotName, String[] arguments) throws ParsingFailedException
      public constructor for a robot. rarely used in practice
      Parameters:
      robotName - name of the robot being launched
      arguments - arguments for the function
      Throws:
      ParsingFailedException
  • Method Details

    • getArgumentsMap

      public Map<String,Argument> getArgumentsMap()
      Abstract method for childClasses to define their expected argument syntax
      Specified by:
      getArgumentsMap in class ClientCommandRequest
      Returns:
      Map of Strings corresponding to the type of argument and a value corresponding to its type.
    • getArguments

      public String[] getArguments()
      Getter for a string array based on the map of an arguments
      Overrides:
      getArguments in class ClientCommandRequest
      Returns:
      a string array of arguments
    • getRobotKind

      public RobotKind getRobotKind()
      Getter for the kind of robot being launched
      Returns:
      the kind of robot being asked to be launched
    • setArguments

      public void setArguments(String[] arguments) throws ParsingFailedException
      Setter for all the arguments of a launch command from a string array
      Parameters:
      arguments - the arguments coming in
      Throws:
      ParsingFailedException
    • setRobot

      public void setRobot(String name)
    • getRobot

      public String getRobot()
    • getRobotName

      public String getRobotName()
      Standard getter for robotName
      Overrides:
      getRobotName in class ClientCommandRequest
      Returns:
      the name of the robot
    • getCommand

      public ImplementedClientCommands getCommand()
      Getter for the client command
      Overrides:
      getCommand in class ClientCommandRequest
      Returns:
      the command that this is