ternary.checked.LongIntObjToBoolE 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, V) -> boolean}.
*
* @param the type of argument 3
* @param the {@code Exception} type that the operation may throw
*/
@FunctionalInterface
public interface LongIntObjToBoolE {
/**
* Performs this operation.
*
* @param l argument 1
* @param i argument 2
* @param v argument 3
* @return the result of the operation
* @throws E if the operation cannot be completed
*/
boolean call(long l, int i, V v) throws E;
/**
* Binds {@code (l)} to the beginning of {@code f}, returning a new function
* of type {@code (int, V) -> boolean}.
*
* @param the type of argument 3
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param l argument 1
* @return a new function {@code (int i, V v) -> boolean} that calls
* {@code f.call(l, i, v)} and returns the result.
*/
static net.mintern.functions.binary.checked.IntObjToBoolE
bind(LongIntObjToBoolE f, long l) {
return (i, v) -> f.call(l, i, v);
}
/**
* Binds {@code (l)} to the beginning of {@code this}, returning a new function
* of type {@code (int, V) -> boolean}.
*
* @param l argument 1
* @return a new function {@code (int i, V v) -> boolean} that calls
* {@code this.call(l, i, v)} and returns the result.
*/
default net.mintern.functions.binary.checked.IntObjToBoolE bind(long l) {
return LongIntObjToBoolE.bind(this, l);
}
/**
* Binds {@code (i, v)} to the end of {@code f}, returning a new function
* of type {@code (long) -> boolean}.
*
* @param the type of argument 3
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param i argument 2
* @param v argument 3
* @return a new function {@code (long l) -> boolean} that calls
* {@code f.call(l, i, v)} and returns the result.
*/
static net.mintern.functions.unary.checked.LongToBoolE
rbind(LongIntObjToBoolE f, int i, V v) {
return (l) -> f.call(l, i, v);
}
/**
* Binds {@code (i, v)} to the end of {@code this}, returning a new function
* of type {@code (long) -> boolean}.
*
* @param i argument 2
* @param v argument 3
* @return a new function {@code (long l) -> boolean} that calls
* {@code this.call(l, i, v)} and returns the result.
*/
default net.mintern.functions.unary.checked.LongToBoolE rbind(int i, V v) {
return LongIntObjToBoolE.rbind(this, i, v);
}
/**
* Binds {@code (l, i)} to the beginning of {@code f}, returning a new function
* of type {@code (V) -> boolean}.
*
* @param the type of argument 3
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param l argument 1
* @param i argument 2
* @return a new function {@code (V v) -> boolean} that calls
* {@code f.call(l, i, v)} and returns the result.
*/
static net.mintern.functions.unary.checked.ObjToBoolE
bind(LongIntObjToBoolE f, long l, int i) {
return (v) -> f.call(l, i, v);
}
/**
* Binds {@code (l, i)} to the beginning of {@code this}, returning a new function
* of type {@code (V) -> boolean}.
*
* @param l argument 1
* @param i argument 2
* @return a new function {@code (V v) -> boolean} that calls
* {@code this.call(l, i, v)} and returns the result.
*/
default net.mintern.functions.unary.checked.ObjToBoolE bind(long l, int i) {
return LongIntObjToBoolE.bind(this, l, i);
}
/**
* Binds {@code (v)} to the end of {@code f}, returning a new function
* of type {@code (long, int) -> boolean}.
*
* @param the type of argument 3
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param v argument 3
* @return a new function {@code (long l, int i) -> boolean} that calls
* {@code f.call(l, i, v)} and returns the result.
*/
static net.mintern.functions.binary.checked.LongIntToBoolE
rbind(LongIntObjToBoolE f, V v) {
return (l, i) -> f.call(l, i, v);
}
/**
* Binds {@code (v)} to the end of {@code this}, returning a new function
* of type {@code (long, int) -> boolean}.
*
* @param v argument 3
* @return a new function {@code (long l, int i) -> boolean} that calls
* {@code this.call(l, i, v)} and returns the result.
*/
default net.mintern.functions.binary.checked.LongIntToBoolE rbind(V v) {
return LongIntObjToBoolE.rbind(this, v);
}
/**
* Binds {@code (l, i, v)} to {@code f}, returning a new function
* of type {@code () -> boolean}.
*
* @param the type of argument 3
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param l argument 1
* @param i argument 2
* @param v argument 3
* @return a new function {@code () -> boolean} that calls
* {@code f.call(l, i, v)} and returns the result.
*/
static net.mintern.functions.nullary.checked.NilToBoolE
bind(LongIntObjToBoolE f, long l, int i, V v) {
return () -> f.call(l, i, v);
}
/**
* Binds {@code (l, i, v)} to {@code this}, returning a new function
* of type {@code () -> boolean}.
*
* @param l argument 1
* @param i argument 2
* @param v argument 3
* @return a new function {@code () -> boolean} that calls
* {@code this.call(l, i, v)} and returns the result.
*/
default net.mintern.functions.nullary.checked.NilToBoolE bind(long l, int i, V v) {
return LongIntObjToBoolE.bind(this, l, i, v);
}
}