Class NumericArgumentDecorator<S extends CommandSource>
java.lang.Object
studio.mevera.imperat.command.arguments.InputArgument<S>
studio.mevera.imperat.annotations.parameters.NumericArgumentDecorator<S>
- All Implemented Interfaces:
Argument<S>,NumericArgument<S>,DescriptionHolder,PermissionHolder
public final class NumericArgumentDecorator<S extends CommandSource>
extends InputArgument<S>
implements NumericArgument<S>
-
Field Summary
Fields inherited from class studio.mevera.imperat.command.arguments.InputArgument
defaultValueProvider, description, flag, format, greedy, index, name, optional, parentCommand, permissionsData, suggestionProvider, type -
Method Summary
Modifier and TypeMethodDescriptionstatic <S extends CommandSource>
NumericArgumentDecorator<S>decorate(@NotNull Argument<S> parameter, @NotNull NumericRange range) format()Formats the usage parameter using the command@NotNull NumericRangegetRange()Methods inherited from class studio.mevera.imperat.command.arguments.InputArgument
addValidator, asCommand, asFlagParameter, describe, equals, getDefaultValueSupplier, getDescription, getName, getParent, getPermissionsData, getPosition, getSuggestionResolver, getValidators, hashCode, 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, getDefaultValueSupplier, getName, getParent, getPosition, getSuggestionResolver, getValidators, greedyLimit, isAnnotated, isCommand, isFlag, 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.NumericArgument
hasRange, matchesRangeMethods inherited from interface studio.mevera.imperat.permissions.PermissionHolder
getPermissionsData, getPrimaryPermission, setPermissionData
-
Method Details
-
decorate
public static <S extends CommandSource> NumericArgumentDecorator<S> decorate(@NotNull @NotNull Argument<S> parameter, @NotNull @NotNull NumericRange range) -
format
Formats the usage parameter using the command- Specified by:
formatin interfaceArgument<S extends CommandSource>- Overrides:
formatin classInputArgument<S extends CommandSource>- Returns:
- the formatted parameter
- See Also:
-
getRange
- Specified by:
getRangein interfaceNumericArgument<S extends CommandSource>- Returns:
- The actual range of the numeric argument. returns the range for the numeric arg, may be empty, but the instance is never null!
-