com.github.akurilov.commons.func.Function4 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-commons Show documentation
Show all versions of java-commons Show documentation
Common functionality Java library
package com.github.akurilov.commons.func;
import java.util.function.Function;
@FunctionalInterface
public interface Function4 {
Z apply(final A a, final B b, final C c, final D d);
static Function partial123(
final Function4 f, final A a, final B b, final C c
) {
return (d) -> f.apply(a, b, c, d);
}
static Function partial124(
final Function4 f, final A a, final B b, final D d
) {
return (c) -> f.apply(a, b, c, d);
}
static Function partial134(
final Function4 f, final A a, final C c, final D d
) {
return (b) -> f.apply(a, b, c, d);
}
static Function partial234(
final Function4 f, final B b, final C c, final D d
) {
return (a) -> f.apply(a, b, c, d);
}
static Function2 partial12(
final Function4 f, final A a, final B b
) {
return (c, d) -> f.apply(a, b, c, d);
}
static Function2 partial13(
final Function4 f, final A a, final C c
) {
return (b, d) -> f.apply(a, b, c, d);
}
static Function2 partial14(
final Function4 f, final A a, final D d
) {
return (b, c) -> f.apply(a, b, c, d);
}
static Function2 partial23(
final Function4 f, final B b, final C c
) {
return (a, d) -> f.apply(a, b, c, d);
}
static Function2 partial24(
final Function4 f, final B b, final D d
) {
return (a, c) -> f.apply(a, b, c, d);
}
static Function2 partial34(
final Function4 f, final C c, final D d
) {
return (a, b) -> f.apply(a, b, c, d);
}
static Function3 partial1(
final Function4 f, final A a
) {
return (b, c, d) -> f.apply(a, b, c, d);
}
static Function3 partial2(
final Function4 f, final B b
) {
return (a, c, d) -> f.apply(a, b, c, d);
}
static Function3 partial3(
final Function4 f, final C c
) {
return (a, b, d) -> f.apply(a, b, c, d);
}
static Function3 partial4(
final Function4 f, final D d
) {
return (a, b, c) -> f.apply(a, b, c, d);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy