Class FunctorUrlParser.PostParser<I extends @NonNull Object,T extends @NonNull Object,P1 extends @NonNull FunctorUrlParser<I>,P2 extends @NonNull Parsers.Functor<I,T>>
java.lang.Object
dev.sympho.modular_commands.api.command.parameter.parse.ParserFunction.PostParser<String,I,T,P1,P2>
dev.sympho.modular_commands.utils.parse.UrlParser.PostParser<I,T,P1,P2>
dev.sympho.modular_commands.utils.parse.FunctorUrlParser.PostParser<I,T,P1,P2>
- Type Parameters:
I- The intermediary type output by the first parser and consumed by the second.T- The final output type.P1- The type of the first parser.P2- The type of the second parser.
- All Implemented Interfaces:
ParserFunction<String,,T> FunctorUrlParser<T>,UrlParser<T>,BiFunction<CommandContext,String, Mono<T>>
- Enclosing interface:
- FunctorUrlParser<T extends @NonNull Object>
public static class FunctorUrlParser.PostParser<I extends @NonNull Object,T extends @NonNull Object,P1 extends @NonNull FunctorUrlParser<I>,P2 extends @NonNull Parsers.Functor<I,T>>
extends UrlParser.PostParser<I,T,P1,P2>
implements FunctorUrlParser<T>
A composed parser that first applies this parser to one parser, and then applies the
results to a second parser. If parsing with either parser throws an exception, it is
relayed to the caller of the composed parser.
Note that compatibility is defined only by the first parser.
- Since:
- 1.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.sympho.modular_commands.utils.parse.FunctorUrlParser
FunctorUrlParser.Choice<T extends @NonNull Object>, FunctorUrlParser.ChoiceBase<T extends @NonNull Object,P extends FunctorUrlParser<T>>, FunctorUrlParser.PostParser<I extends @NonNull Object, T extends @NonNull Object, P1 extends @NonNull FunctorUrlParser<I>, P2 extends @NonNull Parsers.Functor<I, T>> Nested classes/interfaces inherited from interface dev.sympho.modular_commands.api.command.parameter.parse.ParserFunction
ParserFunction.PostParser<R extends @NonNull Object,I extends @NonNull Object, T extends @NonNull Object, P1 extends @NonNull ParserFunction<R, I>, P2 extends @NonNull ParserFunction<I, T>> Nested classes/interfaces inherited from interface dev.sympho.modular_commands.utils.parse.UrlParser
UrlParser.Choice<T extends @NonNull Object>, UrlParser.ChoiceBase<T extends @NonNull Object,P extends UrlParser<T>>, UrlParser.PostParser<I extends @NonNull Object, T extends @NonNull Object, P1 extends @NonNull UrlParser<I>, P2 extends @NonNull ParserFunction<I, T>> -
Field Summary
Fields inherited from class dev.sympho.modular_commands.api.command.parameter.parse.ParserFunction.PostParser
parser, postParser -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class dev.sympho.modular_commands.utils.parse.UrlParser.PostParser
parse, supportsMethods inherited from class dev.sympho.modular_commands.api.command.parameter.parse.ParserFunction.PostParser
parseMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.BiFunction
andThenMethods inherited from interface dev.sympho.modular_commands.utils.parse.FunctorUrlParser
parse, thenMethods inherited from interface dev.sympho.modular_commands.api.command.parameter.parse.ParserFunction
apply
-
Constructor Details
-
PostParser
Creates a new instance.- Parameters:
parser- The first parser to apply.postParser- The second parser to apply.
-
-
Method Details
-
parse
Description copied from interface:FunctorUrlParserParses the given URL.- Specified by:
parsein interfaceFunctorUrlParser<I extends @NonNull Object>- Parameters:
url- The URL to parse.- Returns:
- The parsed value. May result in a
InvalidArgumentExceptionif the URL is invalid. - Throws:
InvalidArgumentException- if the URL is invalid.
-