Class ExternalCommand

java.lang.Object
za.co.wethinkcode.robots.server.commands.Command
za.co.wethinkcode.robots.server.commands.external.ExternalCommand
Direct Known Subclasses:
BackCommand, ClientQuitCommand, FireCommand, ForwardCommand, LaunchCommand, LookCommand, ReloadCommand, RepairCommand, StateCommand, TurnCommand, WorldCommand

public abstract class ExternalCommand extends Command
Abstract class of commands external to server, typically from clients
  • Constructor Details

  • Method Details

    • getCommandName

      public abstract ImplementedClientCommands getCommandName()
      Return which client command this command implements
      Returns:
      the command this child is
    • getArgs

      public List<String> getArgs()
      Getter for the args of an external command
      Returns:
      a list of arguments.
    • getUsage

      public abstract String getUsage()
      Get the way this command is supposed to be used.
      Example for a command foo
      
       #robot-world-client
       > invalid input: '<'foo-usage> invalid input: '<'foo-args>
       
      Returns:
      the string representation of the usage of this command.