Class FlagArgumentImpl<S extends CommandSource>
java.lang.Object
studio.mevera.imperat.command.arguments.InputArgument<S>
studio.mevera.imperat.command.arguments.FlagArgumentImpl<S>
- All Implemented Interfaces:
Argument<S>,FlagArgument<S>,DescriptionHolder,PermissionHolder
@Internal
public final class FlagArgumentImpl<S extends CommandSource>
extends InputArgument<S>
implements FlagArgument<S>
-
Field Summary
Fields inherited from class studio.mevera.imperat.command.arguments.InputArgument
defaultValueProvider, description, format, greedy, index, name, optional, parentCommand, permissionsData, suggestionProvider, type -
Method Summary
Modifier and TypeMethodDescriptionbooleanflagData()format()Formats the usage parameter, the default value is the name of the parameter@NotNull DefaultValueProviderinthashCode()@Nullable SuggestionProvider<S>Methods inherited from class studio.mevera.imperat.command.arguments.InputArgument
addValidator, asCommand, asFlagParameter, describe, getDescription, getName, getParent, getPermissionsData, getPosition, getSuggestionResolver, getValidators, isFlag, isGreedy, isGreedyString, isOptional, setFormat, setParent, setPermissionData, setPosition, similarTo, toString, type, validate, wrappedTypeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface studio.mevera.imperat.command.arguments.Argument
addValidator, asAnnotatedArgument, asCommand, asFlagParameter, asNumeric, getName, getParent, getPosition, getSuggestionResolver, getValidators, greedyLimit, isAnnotated, isCommand, isGreedy, isGreedyString, isNumeric, isOptional, isRequired, setFormat, setParent, setPosition, similarTo, type, validate, valueType, wrappedTypeMethods inherited from interface studio.mevera.imperat.command.DescriptionHolder
describe, describe, getDescriptionMethods inherited from interface studio.mevera.imperat.command.arguments.FlagArgument
inputValueType, isFlag, isSwitchMethods inherited from interface studio.mevera.imperat.permissions.PermissionHolder
getPermissionsData, getPrimaryPermission, setPermissionData
-
Method Details
-
format
Description copied from interface:ArgumentFormats the usage parameter, the default value is the name of the parameter- Specified by:
formatin interfaceArgument<S extends CommandSource>- Overrides:
formatin classInputArgument<S extends CommandSource>- Returns:
- the formatted parameter
- See Also:
-
flagData
- Specified by:
flagDatain interfaceFlagArgument<S extends CommandSource>- Returns:
- The flag's data
-
getDefaultValueSupplier
- Specified by:
getDefaultValueSupplierin interfaceArgument<S extends CommandSource>- Overrides:
getDefaultValueSupplierin classInputArgument<S extends CommandSource>- Returns:
- the default value if it's input is not present in case of the parameter being optional
-
inputSuggestionResolver
- Specified by:
inputSuggestionResolverin interfaceFlagArgument<S extends CommandSource>- Returns:
- the
SuggestionProviderfor input value of this flag null if the flag is switch, check usingFlagArgument.isSwitch()
-
equals
- Overrides:
equalsin classInputArgument<S extends CommandSource>
-
hashCode
public int hashCode()- Overrides:
hashCodein classInputArgument<S extends CommandSource>
-