Class FunctorUrlParser.Choice<T extends @NonNull Object>

Type Parameters:
T - The parsed argument type.
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.Choice<T extends @NonNull Object> extends FunctorUrlParser.ChoiceBase<T,FunctorUrlParser<T>>
Parser that supports multiple URL types by delegating to one of a list of parsers. Note that this includes compatibility checks.
Since:
1.0
API Note:
This is a convenience subtype of ChoiceBase with the second parameter already set.
  • Constructor Details

    • Choice

      public Choice(Function<URL,@Nullable FunctorUrlParser<T>> parserMapper)
      Creates a new instance.
      Parameters:
      parserMapper - The function to use to determine which parser to delegate to for a given URL.