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