public class StateCommand extends ExternalCommand
  • Constructor Details

    • StateCommand

      public StateCommand(String robotName)
    • StateCommand

      public StateCommand(com.google.gson.JsonObject json)
      Construct a state command from incoming Json
      Parameters:
      json - the incoming JSON from a client
  • Method Details

    • executeToString

      public String executeToString(World world)
      Description copied from class: Command
      Each command must implement this method It does the work and returns a result
      Specified by:
      executeToString in class Command
    • execute

      public com.google.gson.JsonObject execute(World world)
      Modern a modern OO implementation of the execute method
      Specified by:
      execute in class Command
      Parameters:
      world -
    • getCommandName

      public ImplementedClientCommands getCommandName()
      Return which client command this command implements
      Specified by:
      getCommandName in class ExternalCommand
      Returns:
      the command this child is
    • getUsage

      public String getUsage()
      Get the way this command is supposed to be used.
      Specified by:
      getUsage in class ExternalCommand
      Returns:
      the string representation of the usage of this command.