Class 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>>

java.lang.Object
dev.sympho.modular_commands.api.command.parameter.parse.ParserFunction.PostParser<R,I,T,P1,P2>
Type Parameters:
R - The original raw type.
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<R,T>, BiFunction<CommandContext,R,Mono<T>>
Direct Known Subclasses:
UrlParser.PostParser
Enclosing interface:
ParserFunction<R extends @NonNull Object,T extends @NonNull Object>

public static class 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>> extends Object implements ParserFunction<R,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.
Since:
1.0
  • Field Details

  • Constructor Details

    • PostParser

      public PostParser(P1 parser, P2 postParser)
      Creates a new instance.
      Parameters:
      parser - The first parser to apply.
      postParser - The second parser to apply.
  • Method Details