Class CompoundArgument<T extends Tuple,C,O>

java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,O>
cloud.commandframework.arguments.compound.CompoundArgument<T,C,O>
Type Parameters:
T - Tuple type
C - Command sender type
O - Output type
All Implemented Interfaces:
CloudKeyHolder<O>, Comparable<CommandArgument<?,?>>
Direct Known Subclasses:
ArgumentPair, ArgumentTriplet

@API(status=STABLE) public class CompoundArgument<T extends Tuple,C,O> extends CommandArgument<C,O>
Compound argument
  • Constructor Details

    • CompoundArgument

      public CompoundArgument(boolean required, @NonNull String name, @NonNull Tuple names, @NonNull Tuple parserTuple, @NonNull Tuple types, @NonNull BiFunction<@NonNull C,@NonNull T,@NonNull O> mapper, @NonNull Function<@NonNull Object[],@NonNull T> tupleFactory, @NonNull io.leangen.geantyref.TypeToken<O> valueType)
      Construct a Compound Argument
      Parameters:
      required - Whether or not the argument is required
      name - The argument name
      names - Names of the sub-arguments (in order)
      parserTuple - The sub arguments
      types - Types of the sub-arguments (in order)
      mapper - Mapper that maps the sub-arguments to the output type
      tupleFactory - Function to use when creating tuple
      valueType - The output type
  • Method Details

    • getParserTuple

      public @NonNull Tuple getParserTuple()
      Get the tuple containing the internal parsers
      Returns:
      Internal parsers
    • getNames

      public @NonNull Tuple getNames()
      Get the argument names
      Returns:
      Argument names
    • getTypes

      public @NonNull Tuple getTypes()
      Get the parser types
      Returns:
      Parser types