javaslang.CheckedFunction18 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javaslang Show documentation
Show all versions of javaslang Show documentation
Javaslang is a Java standard library extension built for Java 8 and above.
/* / \____ _ ______ _____ / \____ ____ _____
* / \__ \/ \ / \__ \ / __// \__ \ / \/ __ \ Javaslang
* _/ // _\ \ \/ / _\ \\_ \/ // _\ \ /\ \__/ / Copyright 2014-2015 Daniel Dietrich
* /___/ \_____/\____/\_____/____/\___\_____/_/ \_/____/ Licensed under the Apache License, Version 2.0
*/
package javaslang;
/*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*\
G E N E R A T O R C R A F T E D
\*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
import java.util.Objects;
/**
* Represents a function with 18 arguments.
*
* @param argument 1 of the function
* @param argument 2 of the function
* @param argument 3 of the function
* @param argument 4 of the function
* @param argument 5 of the function
* @param argument 6 of the function
* @param argument 7 of the function
* @param argument 8 of the function
* @param argument 9 of the function
* @param argument 10 of the function
* @param argument 11 of the function
* @param argument 12 of the function
* @param argument 13 of the function
* @param argument 14 of the function
* @param argument 15 of the function
* @param argument 16 of the function
* @param argument 17 of the function
* @param argument 18 of the function
* @param return type of the function
* @since 1.1.0
*/
@FunctionalInterface
public interface CheckedFunction18 extends λ {
/**
* The serial version uid.
*/
long serialVersionUID = 1L;
/**
* Lifts a method
* reference to a {@code CheckedFunction18}.
*
* @param methodReference (typically) a method reference, e.g. {@code Type::method}
* @param return type
* @param 1st argument
* @param 2nd argument
* @param 3rd argument
* @param 4th argument
* @param 5th argument
* @param 6th argument
* @param 7th argument
* @param 8th argument
* @param 9th argument
* @param 10th argument
* @param 11th argument
* @param 12th argument
* @param 13th argument
* @param 14th argument
* @param 15th argument
* @param 16th argument
* @param 17th argument
* @param 18th argument
* @return a {@code CheckedFunction18}
*/
static CheckedFunction18 lift(CheckedFunction18 methodReference) {
return methodReference;
}
/**
* Applies this function to 18 arguments and returns the result.
*
* @param t1 argument 1
* @param t2 argument 2
* @param t3 argument 3
* @param t4 argument 4
* @param t5 argument 5
* @param t6 argument 6
* @param t7 argument 7
* @param t8 argument 8
* @param t9 argument 9
* @param t10 argument 10
* @param t11 argument 11
* @param t12 argument 12
* @param t13 argument 13
* @param t14 argument 14
* @param t15 argument 15
* @param t16 argument 16
* @param t17 argument 17
* @param t18 argument 18
* @return the result of function application
* @throws Throwable if something goes wrong applying this function to the given arguments
*/
R apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18) throws Throwable;
/**
* Applies this function partially to one argument.
*
* @param t1 argument 1
* @return a partial application of this function
* @throws Throwable if something goes wrong partially applying this function to the given arguments
*/
default CheckedFunction17 apply(T1 t1) throws Throwable {
return (T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18) -> apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18);
}
/**
* Applies this function partially to two arguments.
*
* @param t1 argument 1
* @param t2 argument 2
* @return a partial application of this function
* @throws Throwable if something goes wrong partially applying this function to the given arguments
*/
default CheckedFunction16 apply(T1 t1, T2 t2) throws Throwable {
return (T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18) -> apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18);
}
/**
* Applies this function partially to three arguments.
*
* @param t1 argument 1
* @param t2 argument 2
* @param t3 argument 3
* @return a partial application of this function
* @throws Throwable if something goes wrong partially applying this function to the given arguments
*/
default CheckedFunction15 apply(T1 t1, T2 t2, T3 t3) throws Throwable {
return (T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18) -> apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18);
}
/**
* Applies this function partially to 4 arguments.
*
* @param t1 argument 1
* @param t2 argument 2
* @param t3 argument 3
* @param t4 argument 4
* @return a partial application of this function
* @throws Throwable if something goes wrong partially applying this function to the given arguments
*/
default CheckedFunction14 apply(T1 t1, T2 t2, T3 t3, T4 t4) throws Throwable {
return (T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18) -> apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18);
}
/**
* Applies this function partially to 5 arguments.
*
* @param t1 argument 1
* @param t2 argument 2
* @param t3 argument 3
* @param t4 argument 4
* @param t5 argument 5
* @return a partial application of this function
* @throws Throwable if something goes wrong partially applying this function to the given arguments
*/
default CheckedFunction13 apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) throws Throwable {
return (T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18) -> apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18);
}
/**
* Applies this function partially to 6 arguments.
*
* @param t1 argument 1
* @param t2 argument 2
* @param t3 argument 3
* @param t4 argument 4
* @param t5 argument 5
* @param t6 argument 6
* @return a partial application of this function
* @throws Throwable if something goes wrong partially applying this function to the given arguments
*/
default CheckedFunction12 apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) throws Throwable {
return (T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18) -> apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18);
}
/**
* Applies this function partially to 7 arguments.
*
* @param t1 argument 1
* @param t2 argument 2
* @param t3 argument 3
* @param t4 argument 4
* @param t5 argument 5
* @param t6 argument 6
* @param t7 argument 7
* @return a partial application of this function
* @throws Throwable if something goes wrong partially applying this function to the given arguments
*/
default CheckedFunction11 apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) throws Throwable {
return (T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18) -> apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18);
}
/**
* Applies this function partially to 8 arguments.
*
* @param t1 argument 1
* @param t2 argument 2
* @param t3 argument 3
* @param t4 argument 4
* @param t5 argument 5
* @param t6 argument 6
* @param t7 argument 7
* @param t8 argument 8
* @return a partial application of this function
* @throws Throwable if something goes wrong partially applying this function to the given arguments
*/
default CheckedFunction10 apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) throws Throwable {
return (T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18) -> apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18);
}
/**
* Applies this function partially to 9 arguments.
*
* @param t1 argument 1
* @param t2 argument 2
* @param t3 argument 3
* @param t4 argument 4
* @param t5 argument 5
* @param t6 argument 6
* @param t7 argument 7
* @param t8 argument 8
* @param t9 argument 9
* @return a partial application of this function
* @throws Throwable if something goes wrong partially applying this function to the given arguments
*/
default CheckedFunction9 apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9) throws Throwable {
return (T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18) -> apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18);
}
/**
* Applies this function partially to 10 arguments.
*
* @param t1 argument 1
* @param t2 argument 2
* @param t3 argument 3
* @param t4 argument 4
* @param t5 argument 5
* @param t6 argument 6
* @param t7 argument 7
* @param t8 argument 8
* @param t9 argument 9
* @param t10 argument 10
* @return a partial application of this function
* @throws Throwable if something goes wrong partially applying this function to the given arguments
*/
default CheckedFunction8 apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10) throws Throwable {
return (T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18) -> apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18);
}
/**
* Applies this function partially to 11 arguments.
*
* @param t1 argument 1
* @param t2 argument 2
* @param t3 argument 3
* @param t4 argument 4
* @param t5 argument 5
* @param t6 argument 6
* @param t7 argument 7
* @param t8 argument 8
* @param t9 argument 9
* @param t10 argument 10
* @param t11 argument 11
* @return a partial application of this function
* @throws Throwable if something goes wrong partially applying this function to the given arguments
*/
default CheckedFunction7 apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11) throws Throwable {
return (T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18) -> apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18);
}
/**
* Applies this function partially to 12 arguments.
*
* @param t1 argument 1
* @param t2 argument 2
* @param t3 argument 3
* @param t4 argument 4
* @param t5 argument 5
* @param t6 argument 6
* @param t7 argument 7
* @param t8 argument 8
* @param t9 argument 9
* @param t10 argument 10
* @param t11 argument 11
* @param t12 argument 12
* @return a partial application of this function
* @throws Throwable if something goes wrong partially applying this function to the given arguments
*/
default CheckedFunction6 apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12) throws Throwable {
return (T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18) -> apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18);
}
/**
* Applies this function partially to 13 arguments.
*
* @param t1 argument 1
* @param t2 argument 2
* @param t3 argument 3
* @param t4 argument 4
* @param t5 argument 5
* @param t6 argument 6
* @param t7 argument 7
* @param t8 argument 8
* @param t9 argument 9
* @param t10 argument 10
* @param t11 argument 11
* @param t12 argument 12
* @param t13 argument 13
* @return a partial application of this function
* @throws Throwable if something goes wrong partially applying this function to the given arguments
*/
default CheckedFunction5 apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13) throws Throwable {
return (T14 t14, T15 t15, T16 t16, T17 t17, T18 t18) -> apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18);
}
/**
* Applies this function partially to 14 arguments.
*
* @param t1 argument 1
* @param t2 argument 2
* @param t3 argument 3
* @param t4 argument 4
* @param t5 argument 5
* @param t6 argument 6
* @param t7 argument 7
* @param t8 argument 8
* @param t9 argument 9
* @param t10 argument 10
* @param t11 argument 11
* @param t12 argument 12
* @param t13 argument 13
* @param t14 argument 14
* @return a partial application of this function
* @throws Throwable if something goes wrong partially applying this function to the given arguments
*/
default CheckedFunction4 apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14) throws Throwable {
return (T15 t15, T16 t16, T17 t17, T18 t18) -> apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18);
}
/**
* Applies this function partially to 15 arguments.
*
* @param t1 argument 1
* @param t2 argument 2
* @param t3 argument 3
* @param t4 argument 4
* @param t5 argument 5
* @param t6 argument 6
* @param t7 argument 7
* @param t8 argument 8
* @param t9 argument 9
* @param t10 argument 10
* @param t11 argument 11
* @param t12 argument 12
* @param t13 argument 13
* @param t14 argument 14
* @param t15 argument 15
* @return a partial application of this function
* @throws Throwable if something goes wrong partially applying this function to the given arguments
*/
default CheckedFunction3 apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15) throws Throwable {
return (T16 t16, T17 t17, T18 t18) -> apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18);
}
/**
* Applies this function partially to 16 arguments.
*
* @param t1 argument 1
* @param t2 argument 2
* @param t3 argument 3
* @param t4 argument 4
* @param t5 argument 5
* @param t6 argument 6
* @param t7 argument 7
* @param t8 argument 8
* @param t9 argument 9
* @param t10 argument 10
* @param t11 argument 11
* @param t12 argument 12
* @param t13 argument 13
* @param t14 argument 14
* @param t15 argument 15
* @param t16 argument 16
* @return a partial application of this function
* @throws Throwable if something goes wrong partially applying this function to the given arguments
*/
default CheckedFunction2 apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16) throws Throwable {
return (T17 t17, T18 t18) -> apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18);
}
/**
* Applies this function partially to 17 arguments.
*
* @param t1 argument 1
* @param t2 argument 2
* @param t3 argument 3
* @param t4 argument 4
* @param t5 argument 5
* @param t6 argument 6
* @param t7 argument 7
* @param t8 argument 8
* @param t9 argument 9
* @param t10 argument 10
* @param t11 argument 11
* @param t12 argument 12
* @param t13 argument 13
* @param t14 argument 14
* @param t15 argument 15
* @param t16 argument 16
* @param t17 argument 17
* @return a partial application of this function
* @throws Throwable if something goes wrong partially applying this function to the given arguments
*/
default CheckedFunction1 apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17) throws Throwable {
return (T18 t18) -> apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18);
}
@Override
default int arity() {
return 18;
}
@Override
default CheckedFunction1>>>>>>>>>>>>>>>>> curried() {
return t1 -> t2 -> t3 -> t4 -> t5 -> t6 -> t7 -> t8 -> t9 -> t10 -> t11 -> t12 -> t13 -> t14 -> t15 -> t16 -> t17 -> t18 -> apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18);
}
@Override
default CheckedFunction1, R> tupled() {
return t -> apply(t._1, t._2, t._3, t._4, t._5, t._6, t._7, t._8, t._9, t._10, t._11, t._12, t._13, t._14, t._15, t._16, t._17, t._18);
}
@Override
default CheckedFunction18 reversed() {
return (t18, t17, t16, t15, t14, t13, t12, t11, t10, t9, t8, t7, t6, t5, t4, t3, t2, t1) -> apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18);
}
/**
* Returns a composed function that first applies this CheckedFunction18 to the given argument and then applies
* {@linkplain CheckedFunction1} {@code after} to the result.
*
* @param return type of after
* @param after the function applied after this
* @return a function composed of this and after
* @throws NullPointerException if after is null
*/
default CheckedFunction18 andThen(CheckedFunction1 super R, ? extends V> after) {
Objects.requireNonNull(after, "after is null");
return (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) -> after.apply(apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18));
}
}