Enum Class ImplementedClientCommands

java.lang.Object
java.lang.Enum<ImplementedClientCommands>
za.co.wethinkcode.robots.domain.ImplementedClientCommands
All Implemented Interfaces:
Serializable, Comparable<ImplementedClientCommands>, Constable

public enum ImplementedClientCommands extends Enum<ImplementedClientCommands>
The Implemented client Commands enum captures the allowed variants of a Client Command
  • Enum Constant Details

  • Method Details

    • values

      public static ImplementedClientCommands[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ImplementedClientCommands valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getAliases

      public ArrayList<String> getAliases()
      The available aliases of an implemented Client Command
      Returns:
      all the available aliases for client commands
    • resolveFromAlias

      public static Optional<ImplementedClientCommands> resolveFromAlias(String s)
      Returns either an Implemented ClientCommand or null, but leads it to the call site to handle the null case
      Parameters:
      s - the potential command being parsed
      Returns:
      either the ImplementedClientCommand it's an alias for or null
    • getHelpInfo

      public HelpStruct getHelpInfo()
      How this command is intended to be called e.g. launch invalid input: '<'\make> invalid input: '<'\name>
      Returns:
      the intended usage of this command
    • getResponseKind

      public ResponseKind getResponseKind()
      Returns:
      the ResponseKind of the currently executing command