net.mintern.functions.ternary.checked.LongIntDblToNilE 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 (long, int, double) -> void}.
*
* @param the {@code Exception} type that the operation may throw
*/
@FunctionalInterface
public interface LongIntDblToNilE {
/**
* Performs this operation.
*
* @param l argument 1
* @param i argument 2
* @param d argument 3
* @throws E if the operation cannot be completed
*/
void call(long l, int i, double d) throws E;
/**
* Binds {@code (l)} to the beginning 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 1
* @return a new function {@code (int i, double d) -> void} that calls
* {@code f.call(l, i, d)}.
*/
static net.mintern.functions.binary.checked.IntDblToNilE
bind(LongIntDblToNilE f, long l) {
return (i, d) -> f.call(l, i, d);
}
/**
* Binds {@code (l)} to the beginning of {@code this}, returning a new function
* of type {@code (int, double) -> void}.
*
* @param l argument 1
* @return a new function {@code (int i, double d) -> void} that calls
* {@code this.call(l, i, d)}.
*/
default net.mintern.functions.binary.checked.IntDblToNilE bind(long l) {
return LongIntDblToNilE.bind(this, l);
}
/**
* Binds {@code (i, d)} to the end 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 2
* @param d argument 3
* @return a new function {@code (long l) -> void} that calls
* {@code f.call(l, i, d)}.
*/
static net.mintern.functions.unary.checked.LongToNilE
rbind(LongIntDblToNilE f, int i, double d) {
return (l) -> f.call(l, i, d);
}
/**
* Binds {@code (i, d)} to the end of {@code this}, returning a new function
* of type {@code (long) -> void}.
*
* @param i argument 2
* @param d argument 3
* @return a new function {@code (long l) -> void} that calls
* {@code this.call(l, i, d)}.
*/
default net.mintern.functions.unary.checked.LongToNilE rbind(int i, double d) {
return LongIntDblToNilE.rbind(this, i, d);
}
/**
* Binds {@code (l, i)} to the beginning of {@code f}, returning a new function
* of type {@code (double) -> void}.
*
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param l argument 1
* @param i argument 2
* @return a new function {@code (double d) -> void} that calls
* {@code f.call(l, i, d)}.
*/
static net.mintern.functions.unary.checked.DblToNilE
bind(LongIntDblToNilE f, long l, int i) {
return (d) -> f.call(l, i, d);
}
/**
* Binds {@code (l, i)} to the beginning of {@code this}, returning a new function
* of type {@code (double) -> void}.
*
* @param l argument 1
* @param i argument 2
* @return a new function {@code (double d) -> void} that calls
* {@code this.call(l, i, d)}.
*/
default net.mintern.functions.unary.checked.DblToNilE bind(long l, int i) {
return LongIntDblToNilE.bind(this, l, i);
}
/**
* Binds {@code (d)} to the end of {@code f}, returning a new function
* of type {@code (long, int) -> void}.
*
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param d argument 3
* @return a new function {@code (long l, int i) -> void} that calls
* {@code f.call(l, i, d)}.
*/
static net.mintern.functions.binary.checked.LongIntToNilE
rbind(LongIntDblToNilE f, double d) {
return (l, i) -> f.call(l, i, d);
}
/**
* Binds {@code (d)} to the end of {@code this}, returning a new function
* of type {@code (long, int) -> void}.
*
* @param d argument 3
* @return a new function {@code (long l, int i) -> void} that calls
* {@code this.call(l, i, d)}.
*/
default net.mintern.functions.binary.checked.LongIntToNilE rbind(double d) {
return LongIntDblToNilE.rbind(this, d);
}
/**
* Binds {@code (l, i, d)} 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 l argument 1
* @param i argument 2
* @param d argument 3
* @return a new function {@code () -> void} that calls
* {@code f.call(l, i, d)}.
*/
static net.mintern.functions.nullary.checked.NilToNilE
bind(LongIntDblToNilE f, long l, int i, double d) {
return () -> f.call(l, i, d);
}
/**
* Binds {@code (l, i, d)} to {@code this}, returning a new function
* of type {@code () -> void}.
*
* @param l argument 1
* @param i argument 2
* @param d argument 3
* @return a new function {@code () -> void} that calls
* {@code this.call(l, i, d)}.
*/
default net.mintern.functions.nullary.checked.NilToNilE bind(long l, int i, double d) {
return LongIntDblToNilE.bind(this, l, i, d);
}
}