net.mintern.functions.ternary.checked.LongLongDblToLongE 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
The newest version!
package net.mintern.functions.ternary.checked;
/**
* An operation of type {@code (long, long, double) -> long}.
*
* @param the {@code Exception} type that the operation may throw
*/
@FunctionalInterface
public interface LongLongDblToLongE {
/**
* 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
*/
long 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) -> long}.
*
* @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) -> long} that calls
* {@code f.call(l1, l2, d)} and returns the result.
*/
static net.mintern.functions.binary.checked.LongDblToLongE
bind(LongLongDblToLongE 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) -> long}.
*
* @param l1 argument 1
* @return a new function {@code (long l2, double d) -> long} that calls
* {@code this.call(l1, l2, d)} and returns the result.
*/
default net.mintern.functions.binary.checked.LongDblToLongE bind(long l1) {
return LongLongDblToLongE.bind(this, l1);
}
/**
* Binds {@code (l2, d)} to the end of {@code f}, returning a new function
* of type {@code (long) -> long}.
*
* @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) -> long} that calls
* {@code f.call(l1, l2, d)} and returns the result.
*/
static net.mintern.functions.unary.checked.LongToLongE
rbind(LongLongDblToLongE 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) -> long}.
*
* @param l2 argument 2
* @param d argument 3
* @return a new function {@code (long l1) -> long} that calls
* {@code this.call(l1, l2, d)} and returns the result.
*/
default net.mintern.functions.unary.checked.LongToLongE rbind(long l2, double d) {
return LongLongDblToLongE.rbind(this, l2, d);
}
/**
* Binds {@code (l1, l2)} to the beginning of {@code f}, returning a new function
* of type {@code (double) -> long}.
*
* @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) -> long} that calls
* {@code f.call(l1, l2, d)} and returns the result.
*/
static net.mintern.functions.unary.checked.DblToLongE
bind(LongLongDblToLongE 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) -> long}.
*
* @param l1 argument 1
* @param l2 argument 2
* @return a new function {@code (double d) -> long} that calls
* {@code this.call(l1, l2, d)} and returns the result.
*/
default net.mintern.functions.unary.checked.DblToLongE bind(long l1, long l2) {
return LongLongDblToLongE.bind(this, l1, l2);
}
/**
* Binds {@code (d)} to the end of {@code f}, returning a new function
* of type {@code (long, long) -> long}.
*
* @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) -> long} that calls
* {@code f.call(l1, l2, d)} and returns the result.
*/
static net.mintern.functions.binary.checked.LongLongToLongE
rbind(LongLongDblToLongE 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) -> long}.
*
* @param d argument 3
* @return a new function {@code (long l1, long l2) -> long} that calls
* {@code this.call(l1, l2, d)} and returns the result.
*/
default net.mintern.functions.binary.checked.LongLongToLongE rbind(double d) {
return LongLongDblToLongE.rbind(this, d);
}
/**
* Binds {@code (l1, l2, d)} to {@code f}, returning a new function
* of type {@code () -> long}.
*
* @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 () -> long} that calls
* {@code f.call(l1, l2, d)} and returns the result.
*/
static net.mintern.functions.nullary.checked.NilToLongE
bind(LongLongDblToLongE 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 () -> long}.
*
* @param l1 argument 1
* @param l2 argument 2
* @param d argument 3
* @return a new function {@code () -> long} that calls
* {@code this.call(l1, l2, d)} and returns the result.
*/
default net.mintern.functions.nullary.checked.NilToLongE bind(long l1, long l2, double d) {
return LongLongDblToLongE.bind(this, l1, l2, d);
}
}