ternary.checked.LongObjLongToBoolE 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, U, long) -> boolean}.
*
* @param the type of argument 2
* @param the {@code Exception} type that the operation may throw
*/
@FunctionalInterface
public interface LongObjLongToBoolE {
/**
* 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
*/
boolean 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) -> boolean}.
*
* @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) -> boolean} that calls
* {@code f.call(l1, u, l3)} and returns the result.
*/
static net.mintern.functions.binary.checked.ObjLongToBoolE
bind(LongObjLongToBoolE 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) -> boolean}.
*
* @param l1 argument 1
* @return a new function {@code (U u, long l3) -> boolean} that calls
* {@code this.call(l1, u, l3)} and returns the result.
*/
default net.mintern.functions.binary.checked.ObjLongToBoolE bind(long l1) {
return LongObjLongToBoolE.bind(this, l1);
}
/**
* Binds {@code (u, l3)} to the end of {@code f}, returning a new function
* of type {@code (long) -> boolean}.
*
* @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) -> boolean} that calls
* {@code f.call(l1, u, l3)} and returns the result.
*/
static net.mintern.functions.unary.checked.LongToBoolE
rbind(LongObjLongToBoolE 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) -> boolean}.
*
* @param u argument 2
* @param l3 argument 3
* @return a new function {@code (long l1) -> boolean} that calls
* {@code this.call(l1, u, l3)} and returns the result.
*/
default net.mintern.functions.unary.checked.LongToBoolE rbind(U u, long l3) {
return LongObjLongToBoolE.rbind(this, u, l3);
}
/**
* Binds {@code (l1, u)} to the beginning of {@code f}, returning a new function
* of type {@code (long) -> boolean}.
*
* @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) -> boolean} that calls
* {@code f.call(l1, u, l3)} and returns the result.
*/
static net.mintern.functions.unary.checked.LongToBoolE
bind(LongObjLongToBoolE 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) -> boolean}.
*
* @param l1 argument 1
* @param u argument 2
* @return a new function {@code (long l3) -> boolean} that calls
* {@code this.call(l1, u, l3)} and returns the result.
*/
default net.mintern.functions.unary.checked.LongToBoolE bind(long l1, U u) {
return LongObjLongToBoolE.bind(this, l1, u);
}
/**
* Binds {@code (l3)} to the end of {@code f}, returning a new function
* of type {@code (long, U) -> boolean}.
*
* @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) -> boolean} that calls
* {@code f.call(l1, u, l3)} and returns the result.
*/
static net.mintern.functions.binary.checked.LongObjToBoolE
rbind(LongObjLongToBoolE 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) -> boolean}.
*
* @param l3 argument 3
* @return a new function {@code (long l1, U u) -> boolean} that calls
* {@code this.call(l1, u, l3)} and returns the result.
*/
default net.mintern.functions.binary.checked.LongObjToBoolE rbind(long l3) {
return LongObjLongToBoolE.rbind(this, l3);
}
/**
* Binds {@code (l1, u, l3)} to {@code f}, returning a new function
* of type {@code () -> boolean}.
*
* @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 () -> boolean} that calls
* {@code f.call(l1, u, l3)} and returns the result.
*/
static net.mintern.functions.nullary.checked.NilToBoolE
bind(LongObjLongToBoolE 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 () -> boolean}.
*
* @param l1 argument 1
* @param u argument 2
* @param l3 argument 3
* @return a new function {@code () -> boolean} that calls
* {@code this.call(l1, u, l3)} and returns the result.
*/
default net.mintern.functions.nullary.checked.NilToBoolE bind(long l1, U u, long l3) {
return LongObjLongToBoolE.bind(this, l1, u, l3);
}
}