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 typeU- First argument typeV- Second argument typeW- Third argument typeO- Output type
- All Implemented Interfaces:
CloudKeyHolder<O>,Comparable<CommandArgument<?,?>>
@API(status=STABLE)
public class ArgumentTriplet<C,U,V,W,O>
extends CompoundArgument<Triplet<U,V,W>,C,O>
A compound argument consisting of three inner arguments
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classNested classes/interfaces inherited from class cloud.commandframework.arguments.CommandArgument
CommandArgument.Builder<C,T>, CommandArgument.TypedBuilder<C, T, B extends CommandArgument.Builder<C, T>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedArgumentTriplet(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. -
Method Summary
Modifier and TypeMethodDescriptionstatic <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 tripletMethods inherited from class cloud.commandframework.arguments.compound.CompoundArgument
getNames, getParserTuple, getTypesMethods inherited from class cloud.commandframework.arguments.CommandArgument
addPreprocessor, compareTo, copy, equals, getDefaultDescription, getDefaultValue, getKey, getName, getOwningCommand, getParser, getSuggestionsProvider, getValueType, hasDefaultValue, hashCode, isArgumentRegistered, isRequired, ofType, ofType, preprocess, setArgumentRegistered, setOwningCommand, toString
-
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 requiredname- The argument namenames- Names of the sub-arguments (in order)types- Types of the sub-arguments (in order)parserTriplet- The sub argumentsmapper- Mapper that maps the sub-arguments to the output typevalueType- The output type
-
-
Method Details
-
of
public static <C,U, @NonNull ArgumentTriplet.ArgumentTripletIntermediaryBuilder<@NonNull C,V, W> @NonNull U, of@NonNull V, @NonNull W> (@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 typeU- First parsed typeV- Second parsed typeW- Third type- Parameters:
manager- Command managername- Argument namenames- Sub-argument namestypes- Triplet containing the types of the sub-arguments. There must be parsers for these types registered in theParserRegistryused by theCommandManager- Returns:
- Intermediary builder
-