net.mintern.functions.ternary.checked.IntDblLongToNilE Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of functions-ternary-core Show documentation
Show all versions of functions-ternary-core Show documentation
Provides functional interfaces for the most commonly used two-argument functions
package net.mintern.functions.ternary.checked;
/**
* An operation of type {@code (int, double, long) -> void}.
*
* @param the {@code Exception} type that the operation may throw
*/
@FunctionalInterface
public interface IntDblLongToNilE {
/**
* Performs this operation.
*
* @param i argument 1
* @param d argument 2
* @param l argument 3
* @throws E if the operation cannot be completed
*/
void call(int i, double d, long l) throws E;
/**
* Binds {@code (i)} to the beginning of {@code f}, returning a new function
* of type {@code (double, long) -> void}.
*
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param i argument 1
* @return a new function {@code (double d, long l) -> void} that calls
* {@code f.call(i, d, l)}.
*/
static net.mintern.functions.binary.checked.DblLongToNilE
bind(IntDblLongToNilE f, int i) {
return (d, l) -> f.call(i, d, l);
}
/**
* Binds {@code (i)} to the beginning of {@code this}, returning a new function
* of type {@code (double, long) -> void}.
*
* @param i argument 1
* @return a new function {@code (double d, long l) -> void} that calls
* {@code this.call(i, d, l)}.
*/
default net.mintern.functions.binary.checked.DblLongToNilE bind(int i) {
return IntDblLongToNilE.bind(this, i);
}
/**
* Binds {@code (d, l)} to the end of {@code f}, returning a new function
* of type {@code (int) -> void}.
*
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param d argument 2
* @param l argument 3
* @return a new function {@code (int i) -> void} that calls
* {@code f.call(i, d, l)}.
*/
static net.mintern.functions.unary.checked.IntToNilE
rbind(IntDblLongToNilE f, double d, long l) {
return (i) -> f.call(i, d, l);
}
/**
* Binds {@code (d, l)} to the end of {@code this}, returning a new function
* of type {@code (int) -> void}.
*
* @param d argument 2
* @param l argument 3
* @return a new function {@code (int i) -> void} that calls
* {@code this.call(i, d, l)}.
*/
default net.mintern.functions.unary.checked.IntToNilE rbind(double d, long l) {
return IntDblLongToNilE.rbind(this, d, l);
}
/**
* Binds {@code (i, d)} to the beginning of {@code f}, returning a new function
* of type {@code (long) -> void}.
*
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param i argument 1
* @param d argument 2
* @return a new function {@code (long l) -> void} that calls
* {@code f.call(i, d, l)}.
*/
static net.mintern.functions.unary.checked.LongToNilE
bind(IntDblLongToNilE f, int i, double d) {
return (l) -> f.call(i, d, l);
}
/**
* Binds {@code (i, d)} to the beginning of {@code this}, returning a new function
* of type {@code (long) -> void}.
*
* @param i argument 1
* @param d argument 2
* @return a new function {@code (long l) -> void} that calls
* {@code this.call(i, d, l)}.
*/
default net.mintern.functions.unary.checked.LongToNilE bind(int i, double d) {
return IntDblLongToNilE.bind(this, i, d);
}
/**
* Binds {@code (l)} to the end of {@code f}, returning a new function
* of type {@code (int, double) -> void}.
*
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param l argument 3
* @return a new function {@code (int i, double d) -> void} that calls
* {@code f.call(i, d, l)}.
*/
static net.mintern.functions.binary.checked.IntDblToNilE
rbind(IntDblLongToNilE f, long l) {
return (i, d) -> f.call(i, d, l);
}
/**
* Binds {@code (l)} to the end of {@code this}, returning a new function
* of type {@code (int, double) -> void}.
*
* @param l argument 3
* @return a new function {@code (int i, double d) -> void} that calls
* {@code this.call(i, d, l)}.
*/
default net.mintern.functions.binary.checked.IntDblToNilE rbind(long l) {
return IntDblLongToNilE.rbind(this, l);
}
/**
* Binds {@code (i, d, l)} to {@code f}, returning a new function
* of type {@code () -> void}.
*
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param i argument 1
* @param d argument 2
* @param l argument 3
* @return a new function {@code () -> void} that calls
* {@code f.call(i, d, l)}.
*/
static net.mintern.functions.nullary.checked.NilToNilE
bind(IntDblLongToNilE f, int i, double d, long l) {
return () -> f.call(i, d, l);
}
/**
* Binds {@code (i, d, l)} to {@code this}, returning a new function
* of type {@code () -> void}.
*
* @param i argument 1
* @param d argument 2
* @param l argument 3
* @return a new function {@code () -> void} that calls
* {@code this.call(i, d, l)}.
*/
default net.mintern.functions.nullary.checked.NilToNilE bind(int i, double d, long l) {
return IntDblLongToNilE.bind(this, i, d, l);
}
}