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 typeC
- Command sender typeO
- Output type
- All Implemented Interfaces:
java.lang.Comparable<CommandArgument<?,?>>
- Direct Known Subclasses:
ArgumentPair
,ArgumentTriplet
public class CompoundArgument<T extends Tuple,C,O> extends CommandArgument<C,O>
Compound argument
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class cloud.commandframework.arguments.CommandArgument
CommandArgument.Builder<C,T>
-
-
Constructor Summary
Constructors Constructor Description CompoundArgument(boolean required, @NonNull java.lang.String name, @NonNull Tuple names, @NonNull Tuple parserTuple, @NonNull Tuple types, @NonNull java.util.function.BiFunction<@NonNull C,@NonNull T,@NonNull O> mapper, @NonNull java.util.function.Function<@NonNull java.lang.Object[],@NonNull T> tupleFactory, @NonNull io.leangen.geantyref.TypeToken<O> valueType)
Construct a Compound Argument
-
Method Summary
-
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
-
CompoundArgument
public CompoundArgument(boolean required, @NonNull java.lang.String name, @NonNull Tuple names, @NonNull Tuple parserTuple, @NonNull Tuple types, @NonNull java.util.function.BiFunction<@NonNull C,@NonNull T,@NonNull O> mapper, @NonNull java.util.function.Function<@NonNull java.lang.Object[],@NonNull T> tupleFactory, @NonNull io.leangen.geantyref.TypeToken<O> valueType)
Construct a Compound Argument- Parameters:
required
- Whether or not the argument is requiredname
- The argument namenames
- Names of the sub-arguments (in order)parserTuple
- The sub argumentstypes
- Types of the sub-arguments (in order)mapper
- Mapper that maps the sub-arguments to the output typetupleFactory
- Function to use when creating tuplevalueType
- The output type
-
-
Method Detail
-
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
-
-