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

java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,​O>
cloud.commandframework.arguments.compound.CompoundArgument<Triplet<U,​V,​W>,​C,​O>
cloud.commandframework.arguments.compound.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:
CloudKeyHolder<O>, 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 Details

    • ArgumentTriplet

      protected ArgumentTriplet(boolean required, @NonNull String name, @NonNull Triplet<@NonNull String,​@NonNull String,​@NonNull String> names, @NonNull Triplet<@NonNull Class<U>,​@NonNull Class<V>,​@NonNull Class<W>> types, @NonNull Triplet<@NonNull ArgumentParser<C,​U>,​@NonNull ArgumentParser<C,​V>,​@NonNull ArgumentParser<C,​W>> parserTriplet, @NonNull 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 Details

    • of

      public static <C,​ U,​ V,​ W> @NonNull ArgumentTriplet.ArgumentTripletIntermediaryBuilder<@NonNull C,​@NonNull U,​@NonNull V,​@NonNull W> of(@NonNull CommandManager<C> manager, @NonNull String name, @NonNull Triplet<@NonNull String,​@NonNull String,​@NonNull String> names, @NonNull Triplet<@NonNull Class<U>,​@NonNull Class<V>,​@NonNull 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