net.mintern.functions.ternary.checked.LongObjLongToLongE 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, U, long) -> long}.
*
* @param the type of argument 2
* @param the {@code Exception} type that the operation may throw
*/
@FunctionalInterface
public interface LongObjLongToLongE {
/**
* Performs this operation.
*
* @param l1 argument 1
* @param u argument 2
* @param l3 argument 3
* @return the result of the operation
* @throws E if the operation cannot be completed
*/
long call(long l1, U u, long l3) throws E;
/**
* Binds {@code (l1)} to the beginning of {@code f}, returning a new function
* of type {@code (U, long) -> long}.
*
* @param the type of argument 2
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param l1 argument 1
* @return a new function {@code (U u, long l3) -> long} that calls
* {@code f.call(l1, u, l3)} and returns the result.
*/
static net.mintern.functions.binary.checked.ObjLongToLongE
bind(LongObjLongToLongE f, long l1) {
return (u, l3) -> f.call(l1, u, l3);
}
/**
* Binds {@code (l1)} to the beginning of {@code this}, returning a new function
* of type {@code (U, long) -> long}.
*
* @param l1 argument 1
* @return a new function {@code (U u, long l3) -> long} that calls
* {@code this.call(l1, u, l3)} and returns the result.
*/
default net.mintern.functions.binary.checked.ObjLongToLongE bind(long l1) {
return LongObjLongToLongE.bind(this, l1);
}
/**
* Binds {@code (u, l3)} to the end of {@code f}, returning a new function
* of type {@code (long) -> long}.
*
* @param the type of argument 2
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param u argument 2
* @param l3 argument 3
* @return a new function {@code (long l1) -> long} that calls
* {@code f.call(l1, u, l3)} and returns the result.
*/
static net.mintern.functions.unary.checked.LongToLongE
rbind(LongObjLongToLongE f, U u, long l3) {
return (l1) -> f.call(l1, u, l3);
}
/**
* Binds {@code (u, l3)} to the end of {@code this}, returning a new function
* of type {@code (long) -> long}.
*
* @param u argument 2
* @param l3 argument 3
* @return a new function {@code (long l1) -> long} that calls
* {@code this.call(l1, u, l3)} and returns the result.
*/
default net.mintern.functions.unary.checked.LongToLongE rbind(U u, long l3) {
return LongObjLongToLongE.rbind(this, u, l3);
}
/**
* Binds {@code (l1, u)} to the beginning of {@code f}, returning a new function
* of type {@code (long) -> long}.
*
* @param the type of argument 2
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param l1 argument 1
* @param u argument 2
* @return a new function {@code (long l3) -> long} that calls
* {@code f.call(l1, u, l3)} and returns the result.
*/
static net.mintern.functions.unary.checked.LongToLongE
bind(LongObjLongToLongE f, long l1, U u) {
return (l3) -> f.call(l1, u, l3);
}
/**
* Binds {@code (l1, u)} to the beginning of {@code this}, returning a new function
* of type {@code (long) -> long}.
*
* @param l1 argument 1
* @param u argument 2
* @return a new function {@code (long l3) -> long} that calls
* {@code this.call(l1, u, l3)} and returns the result.
*/
default net.mintern.functions.unary.checked.LongToLongE bind(long l1, U u) {
return LongObjLongToLongE.bind(this, l1, u);
}
/**
* Binds {@code (l3)} to the end of {@code f}, returning a new function
* of type {@code (long, U) -> long}.
*
* @param the type of argument 2
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param l3 argument 3
* @return a new function {@code (long l1, U u) -> long} that calls
* {@code f.call(l1, u, l3)} and returns the result.
*/
static net.mintern.functions.binary.checked.LongObjToLongE
rbind(LongObjLongToLongE f, long l3) {
return (l1, u) -> f.call(l1, u, l3);
}
/**
* Binds {@code (l3)} to the end of {@code this}, returning a new function
* of type {@code (long, U) -> long}.
*
* @param l3 argument 3
* @return a new function {@code (long l1, U u) -> long} that calls
* {@code this.call(l1, u, l3)} and returns the result.
*/
default net.mintern.functions.binary.checked.LongObjToLongE rbind(long l3) {
return LongObjLongToLongE.rbind(this, l3);
}
/**
* Binds {@code (l1, u, l3)} to {@code f}, returning a new function
* of type {@code () -> long}.
*
* @param the type of argument 2
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param l1 argument 1
* @param u argument 2
* @param l3 argument 3
* @return a new function {@code () -> long} that calls
* {@code f.call(l1, u, l3)} and returns the result.
*/
static net.mintern.functions.nullary.checked.NilToLongE
bind(LongObjLongToLongE f, long l1, U u, long l3) {
return () -> f.call(l1, u, l3);
}
/**
* Binds {@code (l1, u, l3)} to {@code this}, returning a new function
* of type {@code () -> long}.
*
* @param l1 argument 1
* @param u argument 2
* @param l3 argument 3
* @return a new function {@code () -> long} that calls
* {@code this.call(l1, u, l3)} and returns the result.
*/
default net.mintern.functions.nullary.checked.NilToLongE bind(long l1, U u, long l3) {
return LongObjLongToLongE.bind(this, l1, u, l3);
}
}