Package org.incendo.cloud.component
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 Summary
Enum ConstantsEnum ConstantDescriptionAn optional argument that represents multiple command flags.A literal component that can be parsed by its name, or any of its aliases.An optional variable that is parsed into an object if present.A required variable argument that is parsed into an object. -
Method Summary
Modifier and TypeMethodDescriptionbooleanoptional()Returns whether the component is optionalbooleanrequired()Returns whether the component is requiredReturns the enum constant of this type with the specified name.static CommandComponent.ComponentType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
LITERAL
A literal component that can be parsed by its name, or any of its aliases. -
REQUIRED_VARIABLE
A required variable argument that is parsed into an object. -
OPTIONAL_VARIABLE
An optional variable that is parsed into an object if present. May have a default fallback value. -
FLAG
An optional argument that represents multiple command flags.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
required
public boolean required()Returns whether the component is requiredThis always returns the opposite of
optional().- Returns:
- whether the component is required
-
optional
public boolean optional()Returns whether the component is optionalThis always returns the opposite of
required().- Returns:
- whether the component is optional
-