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