Enum CommandComponent.ComponentType

java.lang.Object
java.lang.Enum<CommandComponent.ComponentType>
org.incendo.cloud.component.CommandComponent.ComponentType
All Implemented Interfaces:
Serializable, Comparable<CommandComponent.ComponentType>
Enclosing class:
CommandComponent<C>

@API(status=STABLE) public static enum CommandComponent.ComponentType extends Enum<CommandComponent.ComponentType>
  • Enum Constant Details

    • LITERAL

      public static final CommandComponent.ComponentType LITERAL
      A literal component that can be parsed by its name, or any of its aliases.
    • REQUIRED_VARIABLE

      public static final CommandComponent.ComponentType REQUIRED_VARIABLE
      A required variable argument that is parsed into an object.
    • OPTIONAL_VARIABLE

      public static final CommandComponent.ComponentType OPTIONAL_VARIABLE
      An optional variable that is parsed into an object if present. May have a default fallback value.
    • FLAG

      public static final CommandComponent.ComponentType FLAG
      An optional argument that represents multiple command flags.
  • Method Details

    • values

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

      public static CommandComponent.ComponentType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • required

      public boolean required()
      Returns whether the component is required

      This always returns the opposite of optional().

      Returns:
      whether the component is required
    • optional

      public boolean optional()
      Returns whether the component is optional

      This always returns the opposite of required().

      Returns:
      whether the component is optional