Class NumberArgumentResolver<SENDER,T extends Number>
java.lang.Object
dev.rollczi.litecommands.argument.resolver.ArgumentResolver<SENDER,T>
dev.rollczi.litecommands.argument.resolver.standard.NumberArgumentResolver<SENDER,T>
- All Implemented Interfaces:
Parser<SENDER,,RawInput, T> RawInputParser<SENDER,,T> MultipleArgumentResolver<SENDER,,T> Suggester<SENDER,,T> Rangeable<Argument<T>>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FailedReasonfailedReason(Invocation<SENDER> invocation, Argument<T> context, String argument) static <SENDER,T extends Number>
ArgumentResolver<SENDER, T> static <SENDER,T extends Number>
ArgumentResolver<SENDER, T> static <SENDER> ArgumentResolver<SENDER, Byte> ofByte()static <SENDER> ArgumentResolver<SENDER, Double> ofDouble()static <SENDER> ArgumentResolver<SENDER, Float> ofFloat()static <SENDER> ArgumentResolver<SENDER, Integer> static <SENDER> ArgumentResolver<SENDER, Long> ofLong()static <SENDER> ArgumentResolver<SENDER, Short> ofShort()protected ParseResult<T> suggest(Invocation<SENDER> invocation, Argument<T> argument, SuggestionContext context) Methods inherited from class dev.rollczi.litecommands.argument.resolver.ArgumentResolver
canParse, canParse, getRange, parseMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.rollczi.litecommands.argument.parser.RawInputParser
getInputType
-
Constructor Details
-
NumberArgumentResolver
-
-
Method Details
-
parse
- Specified by:
parsein classArgumentResolver<SENDER,T extends Number>
-
failedReason
protected FailedReason failedReason(Invocation<SENDER> invocation, Argument<T> context, String argument) -
suggest
public SuggestionResult suggest(Invocation<SENDER> invocation, Argument<T> argument, SuggestionContext context) -
of
public static <SENDER,T extends Number> ArgumentResolver<SENDER,T> of(Function<String, T> parser, List<T> suggestions) -
of
public static <SENDER,T extends Number> ArgumentResolver<SENDER,T> of(Function<String, T> parser, List<T> suggestions, boolean generateSuggestions) -
ofInteger
-
ofDouble
-
ofFloat
-
ofLong
-
ofShort
-
ofByte
-