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