binary.checked.BoolDblToCharE Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of functions-binary-extended Show documentation
Show all versions of functions-binary-extended Show documentation
Provides functional interfaces for most two-argument functions
package net.mintern.functions.binary.checked;
/**
* An operation of type {@code (boolean, double) -> char}.
*
* @param the {@code Exception} type that the operation may throw
*/
@FunctionalInterface
public interface BoolDblToCharE {
/**
* Performs this operation.
*
* @param bool argument 1
* @param d argument 2
* @return the result of the operation
* @throws E if the operation cannot be completed
*/
char call(boolean bool, double d) throws E;
/**
* Binds {@code (bool)} to the beginning of {@code f}, returning a new function
* of type {@code (double) -> char}.
*
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param bool argument 1
* @return a new function {@code (double d) -> char} that calls
* {@code f.call(bool, d)} and returns the result.
*/
static net.mintern.functions.unary.checked.DblToCharE
bind(BoolDblToCharE f, boolean bool) {
return (d) -> f.call(bool, d);
}
/**
* Binds {@code (bool)} to the beginning of {@code this}, returning a new function
* of type {@code (double) -> char}.
*
* @param bool argument 1
* @return a new function {@code (double d) -> char} that calls
* {@code this.call(bool, d)} and returns the result.
*/
default net.mintern.functions.unary.checked.DblToCharE bind(boolean bool) {
return BoolDblToCharE.bind(this, bool);
}
/**
* Binds {@code (d)} to the end of {@code f}, returning a new function
* of type {@code (boolean) -> char}.
*
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param d argument 2
* @return a new function {@code (boolean bool) -> char} that calls
* {@code f.call(bool, d)} and returns the result.
*/
static net.mintern.functions.unary.checked.BoolToCharE
rbind(BoolDblToCharE f, double d) {
return (bool) -> f.call(bool, d);
}
/**
* Binds {@code (d)} to the end of {@code this}, returning a new function
* of type {@code (boolean) -> char}.
*
* @param d argument 2
* @return a new function {@code (boolean bool) -> char} that calls
* {@code this.call(bool, d)} and returns the result.
*/
default net.mintern.functions.unary.checked.BoolToCharE rbind(double d) {
return BoolDblToCharE.rbind(this, d);
}
/**
* Binds {@code (bool, d)} to {@code f}, returning a new function
* of type {@code () -> char}.
*
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param bool argument 1
* @param d argument 2
* @return a new function {@code () -> char} that calls
* {@code f.call(bool, d)} and returns the result.
*/
static net.mintern.functions.nullary.checked.NilToCharE
bind(BoolDblToCharE f, boolean bool, double d) {
return () -> f.call(bool, d);
}
/**
* Binds {@code (bool, d)} to {@code this}, returning a new function
* of type {@code () -> char}.
*
* @param bool argument 1
* @param d argument 2
* @return a new function {@code () -> char} that calls
* {@code this.call(bool, d)} and returns the result.
*/
default net.mintern.functions.nullary.checked.NilToCharE bind(boolean bool, double d) {
return BoolDblToCharE.bind(this, bool, d);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy