⚡ Make it possible to extent the argument product types
This commit is contained in:
parent
94710c5174
commit
cd90665559
2 changed files with 49 additions and 27 deletions
|
|
@ -43,7 +43,18 @@ import java.util.function.Function;
|
||||||
*/
|
*/
|
||||||
public final class ArgumentPair<C, U, V, O> extends CompoundArgument<Pair<U, V>, C, O> {
|
public final class ArgumentPair<C, U, V, O> extends CompoundArgument<Pair<U, V>, C, O> {
|
||||||
|
|
||||||
private ArgumentPair(final boolean required,
|
/**
|
||||||
|
* Create a new argument pair.
|
||||||
|
*
|
||||||
|
* @param required Whether or not the argument is required
|
||||||
|
* @param name The argument name
|
||||||
|
* @param names Names of the sub-arguments (in order)
|
||||||
|
* @param types Types of the sub-arguments (in order)
|
||||||
|
* @param parserPair The sub arguments
|
||||||
|
* @param mapper Mapper that maps the sub-arguments to the output type
|
||||||
|
* @param valueType The output type
|
||||||
|
*/
|
||||||
|
protected ArgumentPair(final boolean required,
|
||||||
@Nonnull final String name,
|
@Nonnull final String name,
|
||||||
@Nonnull final Pair<String, String> names,
|
@Nonnull final Pair<String, String> names,
|
||||||
@Nonnull final Pair<Class<U>, Class<V>> types,
|
@Nonnull final Pair<Class<U>, Class<V>> types,
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,18 @@ import java.util.function.Function;
|
||||||
*/
|
*/
|
||||||
public final class ArgumentTriplet<C, U, V, W, O> extends CompoundArgument<Triplet<U, V, W>, C, O> {
|
public final class ArgumentTriplet<C, U, V, W, O> extends CompoundArgument<Triplet<U, V, W>, C, O> {
|
||||||
|
|
||||||
private ArgumentTriplet(final boolean required,
|
/**
|
||||||
|
* Create a new argument triplet.
|
||||||
|
*
|
||||||
|
* @param required Whether or not the argument is required
|
||||||
|
* @param name The argument name
|
||||||
|
* @param names Names of the sub-arguments (in order)
|
||||||
|
* @param types Types of the sub-arguments (in order)
|
||||||
|
* @param parserTriplet The sub arguments
|
||||||
|
* @param mapper Mapper that maps the sub-arguments to the output type
|
||||||
|
* @param valueType The output type
|
||||||
|
*/
|
||||||
|
protected ArgumentTriplet(final boolean required,
|
||||||
@Nonnull final String name,
|
@Nonnull final String name,
|
||||||
@Nonnull final Triplet<String, String, String> names,
|
@Nonnull final Triplet<String, String, String> names,
|
||||||
@Nonnull final Triplet<Class<U>, Class<V>, Class<W>> types,
|
@Nonnull final Triplet<Class<U>, Class<V>, Class<W>> types,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue