All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.akurilov.commons.func.Function3 Maven / Gradle / Ivy

package com.github.akurilov.commons.func;

import java.util.function.Function;

@FunctionalInterface
public interface Function3 {

	Z apply(final A a, final B b, final C c);

	static  Function partial12(
		final Function3 f, final A a, final B b
	) {
		return (c) -> f.apply(a, b, c);
	}

	static  Function partial13(
		final Function3 f, final A a, final C c
	) {
		return (b) -> f.apply(a, b, c);
	}

	static  Function partial23(
		final Function3 f, final B b, final C c
	) {
		return (a) -> f.apply(a, b, c);
	}

	static  Function2 partial1(final Function3 f, final A a) {
		return (b, c) -> f.apply(a, b, c);
	}

	static  Function2 partial2(final Function3 f, final B b) {
		return (a, c) -> f.apply(a, b, c);
	}

	static  Function2 partial3(final Function3 f, final C c) {
		return (a, b) -> f.apply(a, b, c);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy