Class ArgumentTriplet<C,​U,​V,​W,​O>

  • Type Parameters:
    C - Command sender type
    U - First argument type
    V - Second argument type
    W - Third argument type
    O - Output type
    All Implemented Interfaces:
    java.lang.Comparable<CommandArgument<?,​?>>

    public class ArgumentTriplet<C,​U,​V,​W,​O>
    extends CompoundArgument<Triplet<U,​V,​W>,​C,​O>
    A compound argument consisting of three inner arguments
    • Constructor Detail

      • ArgumentTriplet

        protected ArgumentTriplet​(boolean required,
                                  @NonNull java.lang.String name,
                                  @NonNull Triplet<@NonNull java.lang.String,​@NonNull java.lang.String,​@NonNull java.lang.String> names,
                                  @NonNull Triplet<@NonNull java.lang.Class<U>,​@NonNull java.lang.Class<V>,​@NonNull java.lang.Class<W>> types,
                                  @NonNull Triplet<@NonNull ArgumentParser<C,​U>,​@NonNull ArgumentParser<C,​V>,​@NonNull ArgumentParser<C,​W>> parserTriplet,
                                  @NonNull java.util.function.BiFunction<@NonNull C,​@NonNull Triplet<U,​@NonNull V,​@NonNull W>,​@NonNull O> mapper,
                                  @NonNull io.leangen.geantyref.TypeToken<O> valueType)
        Create a new argument triplet.
        Parameters:
        required - Whether or not the argument is required
        name - The argument name
        names - Names of the sub-arguments (in order)
        types - Types of the sub-arguments (in order)
        parserTriplet - The sub arguments
        mapper - Mapper that maps the sub-arguments to the output type
        valueType - The output type
    • Method Detail

      • of

        public static <C,​U,​V,​W> @NonNull ArgumentTriplet.ArgumentTripletIntermediaryBuilder<@NonNull C,​@NonNull U,​@NonNull V,​@NonNull W> of​(@NonNull CommandManager<C> manager,
                                                                                                                                                                                @NonNull java.lang.String name,
                                                                                                                                                                                @NonNull Triplet<@NonNull java.lang.String,​@NonNull java.lang.String,​@NonNull java.lang.String> names,
                                                                                                                                                                                @NonNull Triplet<@NonNull java.lang.Class<U>,​@NonNull java.lang.Class<V>,​@NonNull java.lang.Class<W>> types)
        Construct a builder for an argument triplet
        Type Parameters:
        C - Command sender type
        U - First parsed type
        V - Second parsed type
        W - Third type
        Parameters:
        manager - Command manager
        name - Argument name
        names - Sub-argument names
        types - Triplet containing the types of the sub-arguments. There must be parsers for these types registered in the ParserRegistry used by the CommandManager
        Returns:
        Intermediary builder