Enum FlagArgument.FailureReason
- java.lang.Object
-
- java.lang.Enum<FlagArgument.FailureReason>
-
- cloud.commandframework.arguments.compound.FlagArgument.FailureReason
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<FlagArgument.FailureReason>
,java.lang.constant.Constable
- Enclosing class:
- FlagArgument<C>
public static enum FlagArgument.FailureReason extends java.lang.Enum<FlagArgument.FailureReason>
Reasons for which flag parsing may fail
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DUPLICATE_FLAG
MISSING_ARGUMENT
NO_FLAG_STARTED
UNKNOWN_FLAG
-
Method Summary
Modifier and Type Method Description @NonNull Caption
getCaption()
Get the caption used for this failure reasonstatic FlagArgument.FailureReason
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static FlagArgument.FailureReason[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN_FLAG
public static final FlagArgument.FailureReason UNKNOWN_FLAG
-
DUPLICATE_FLAG
public static final FlagArgument.FailureReason DUPLICATE_FLAG
-
NO_FLAG_STARTED
public static final FlagArgument.FailureReason NO_FLAG_STARTED
-
MISSING_ARGUMENT
public static final FlagArgument.FailureReason MISSING_ARGUMENT
-
-
Method Detail
-
values
public static FlagArgument.FailureReason[] 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 FlagArgument.FailureReason valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getCaption
public @NonNull Caption getCaption()
Get the caption used for this failure reason- Returns:
- The caption
-
-