ternary.checked.LongLongDblToObjE 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, long, double) -> R}.
*
* @param the type of the return value
* @param the {@code Exception} type that the operation may throw
*/
@FunctionalInterface
public interface LongLongDblToObjE {
/**
* Performs this operation.
*
* @param l1 argument 1
* @param l2 argument 2
* @param d argument 3
* @return the result of the operation
* @throws E if the operation cannot be completed
*/
R call(long l1, long l2, double d) throws E;
/**
* Binds {@code (l1)} to the beginning of {@code f}, returning a new function
* of type {@code (long, double) -> R}.
*
* @param the type of the return value
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param l1 argument 1
* @return a new function {@code (long l2, double d) -> R} that calls
* {@code f.call(l1, l2, d)} and returns the result.
*/
static net.mintern.functions.binary.checked.LongDblToObjE
bind(LongLongDblToObjE f, long l1) {
return (l2, d) -> f.call(l1, l2, d);
}
/**
* Binds {@code (l1)} to the beginning of {@code this}, returning a new function
* of type {@code (long, double) -> R}.
*
* @param l1 argument 1
* @return a new function {@code (long l2, double d) -> R} that calls
* {@code this.call(l1, l2, d)} and returns the result.
*/
default net.mintern.functions.binary.checked.LongDblToObjE bind(long l1) {
return LongLongDblToObjE.bind(this, l1);
}
/**
* Binds {@code (l2, d)} to the end of {@code f}, returning a new function
* of type {@code (long) -> R}.
*
* @param the type of the return value
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param l2 argument 2
* @param d argument 3
* @return a new function {@code (long l1) -> R} that calls
* {@code f.call(l1, l2, d)} and returns the result.
*/
static net.mintern.functions.unary.checked.LongToObjE
rbind(LongLongDblToObjE f, long l2, double d) {
return (l1) -> f.call(l1, l2, d);
}
/**
* Binds {@code (l2, d)} to the end of {@code this}, returning a new function
* of type {@code (long) -> R}.
*
* @param l2 argument 2
* @param d argument 3
* @return a new function {@code (long l1) -> R} that calls
* {@code this.call(l1, l2, d)} and returns the result.
*/
default net.mintern.functions.unary.checked.LongToObjE rbind(long l2, double d) {
return LongLongDblToObjE.rbind(this, l2, d);
}
/**
* Binds {@code (l1, l2)} to the beginning of {@code f}, returning a new function
* of type {@code (double) -> R}.
*
* @param the type of the return value
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param l1 argument 1
* @param l2 argument 2
* @return a new function {@code (double d) -> R} that calls
* {@code f.call(l1, l2, d)} and returns the result.
*/
static net.mintern.functions.unary.checked.DblToObjE
bind(LongLongDblToObjE f, long l1, long l2) {
return (d) -> f.call(l1, l2, d);
}
/**
* Binds {@code (l1, l2)} to the beginning of {@code this}, returning a new function
* of type {@code (double) -> R}.
*
* @param l1 argument 1
* @param l2 argument 2
* @return a new function {@code (double d) -> R} that calls
* {@code this.call(l1, l2, d)} and returns the result.
*/
default net.mintern.functions.unary.checked.DblToObjE bind(long l1, long l2) {
return LongLongDblToObjE.bind(this, l1, l2);
}
/**
* Binds {@code (d)} to the end of {@code f}, returning a new function
* of type {@code (long, long) -> R}.
*
* @param the type of the return value
* @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 l1, long l2) -> R} that calls
* {@code f.call(l1, l2, d)} and returns the result.
*/
static net.mintern.functions.binary.checked.LongLongToObjE
rbind(LongLongDblToObjE f, double d) {
return (l1, l2) -> f.call(l1, l2, d);
}
/**
* Binds {@code (d)} to the end of {@code this}, returning a new function
* of type {@code (long, long) -> R}.
*
* @param d argument 3
* @return a new function {@code (long l1, long l2) -> R} that calls
* {@code this.call(l1, l2, d)} and returns the result.
*/
default net.mintern.functions.binary.checked.LongLongToObjE rbind(double d) {
return LongLongDblToObjE.rbind(this, d);
}
/**
* Binds {@code (l1, l2, d)} to {@code f}, returning a new function
* of type {@code () -> R}.
*
* @param the type of the return value
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param l1 argument 1
* @param l2 argument 2
* @param d argument 3
* @return a new function {@code () -> R} that calls
* {@code f.call(l1, l2, d)} and returns the result.
*/
@SuppressWarnings("unchecked") // maven spuriously warns about a type error in this case
static net.mintern.functions.nullary.checked.NilToObjE
bind(LongLongDblToObjE f, long l1, long l2, double d) {
return () -> f.call(l1, l2, d);
}
/**
* Binds {@code (l1, l2, d)} to {@code this}, returning a new function
* of type {@code () -> R}.
*
* @param l1 argument 1
* @param l2 argument 2
* @param d argument 3
* @return a new function {@code () -> R} that calls
* {@code this.call(l1, l2, d)} and returns the result.
*/
default net.mintern.functions.nullary.checked.NilToObjE bind(long l1, long l2, double d) {
return LongLongDblToObjE.bind(this, l1, l2, d);
}
}