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