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