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

com.g2forge.alexandria.java.function.IPredicate3 Maven / Gradle / Ivy

There is a newer version: 0.0.18
Show newest version
package com.g2forge.alexandria.java.function;

import java.util.Objects;
import java.util.function.Supplier;

@FunctionalInterface
public interface IPredicate3 extends IPredicate {
	public static  IPredicate3 create(boolean value) {
		return (i0, i1, i2) -> value;
	}

	public static  IPredicate3 create(IPredicate3 predicate) {
		return predicate;
	}

	public default IPredicate2 compose0(Supplier before) {
		Objects.requireNonNull(before);
		return (i1, i2) -> test(before.get(), i1, i2);
	}

	public default IPredicate2 compose1(Supplier before) {
		Objects.requireNonNull(before);
		return (i0, i2) -> test(i0, before.get(), i2);
	}

	public default IPredicate2 compose2(Supplier before) {
		Objects.requireNonNull(before);
		return (i0, i1) -> test(i0, i1, before.get());
	}

	public default IPredicate2 curry0(I0 input0) {
		return (input1, input2) -> test(input0, input1, input2);
	}

	public default IPredicate2 curry1(I1 input1) {
		return (input0, input2) -> test(input0, input1, input2);
	}

	public default IPredicate2 curry2(I2 input2) {
		return (input0, input1) -> test(input0, input1, input2);
	}

	public default IConsumer3 noReturn() {
		return (i0, i1, i2) -> test(i0, i1, i2);
	}

	public boolean test(I0 i0, I1 i1, I2 i2);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy