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:
CloudKeyHolder<O>
,Comparable<CommandArgument<?,
?>>
- Direct Known Subclasses:
ArgumentPair
,ArgumentTriplet
Compound argument
-
Nested Class Summary
Nested 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
ConstructorDescriptionCompoundArgument
(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 -
Method Summary
Methods 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
-
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 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 Details
-
getParserTuple
Get the tuple containing the internal parsers- Returns:
- Internal parsers
-
getNames
Get the argument names- Returns:
- Argument names
-
getTypes
Get the parser types- Returns:
- Parser types
-