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:
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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classArgumentTriplet.ArgumentTripletIntermediaryBuilder<C,U,V,W>-
Nested classes/interfaces inherited from class cloud.commandframework.arguments.CommandArgument
CommandArgument.Builder<C,T>
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedArgumentTriplet(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.
-
Method Summary
Modifier and Type Method Description 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-
Methods inherited from class cloud.commandframework.arguments.compound.CompoundArgument
getNames, getParserTuple, getTypes
-
Methods inherited from class cloud.commandframework.arguments.CommandArgument
addPreprocessor, compareTo, copy, equals, getDefaultValue, getName, getOwningCommand, getParser, getSuggestionsProvider, getValueType, hasDefaultValue, hashCode, isArgumentRegistered, isRequired, ofType, ofType, preprocess, setArgumentRegistered, setOwningCommand, toString
-
-
-
-
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 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 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 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
-
-