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

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

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

import java.util.Objects;

@FunctionalInterface
public interface IConsumer3 extends IConsumer {
	public static  IConsumer3 create(IConsumer3 consumer) {
		return consumer;
	}

	public void accept(I0 i0, I1 i1, I2 i2);

	public default IConsumer3 andThen(IConsumer3 after) {
		Objects.requireNonNull(after);

		return (i0, i1, i2) -> {
			accept(i0, i1, i2);
			after.accept(i0, i1, i2);
		};
	}

	public default IConsumer2 curry0(I0 input0) {
		return (input1, input2) -> this.accept(input0, input1, input2);
	}

	public default IConsumer2 curry1(I1 input1) {
		return (input0, input2) -> this.accept(input0, input1, input2);
	}

	public default IConsumer2 curry2(I2 input2) {
		return (input0, input1) -> this.accept(input0, input1, input2);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy