binary.checked.DblIntToFloatE 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 (double, int) -> float}.
*
* @param the {@code Exception} type that the operation may throw
*/
@FunctionalInterface
public interface DblIntToFloatE {
/**
* Performs this operation.
*
* @param d argument 1
* @param i argument 2
* @return the result of the operation
* @throws E if the operation cannot be completed
*/
float call(double d, int i) throws E;
/**
* Binds {@code (d)} to the beginning of {@code f}, returning a new function
* of type {@code (int) -> float}.
*
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param d argument 1
* @return a new function {@code (int i) -> float} that calls
* {@code f.call(d, i)} and returns the result.
*/
static net.mintern.functions.unary.checked.IntToFloatE
bind(DblIntToFloatE f, double d) {
return (i) -> f.call(d, i);
}
/**
* Binds {@code (d)} to the beginning of {@code this}, returning a new function
* of type {@code (int) -> float}.
*
* @param d argument 1
* @return a new function {@code (int i) -> float} that calls
* {@code this.call(d, i)} and returns the result.
*/
default net.mintern.functions.unary.checked.IntToFloatE bind(double d) {
return DblIntToFloatE.bind(this, d);
}
/**
* Binds {@code (i)} to the end of {@code f}, returning a new function
* of type {@code (double) -> float}.
*
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param i argument 2
* @return a new function {@code (double d) -> float} that calls
* {@code f.call(d, i)} and returns the result.
*/
static net.mintern.functions.unary.checked.DblToFloatE
rbind(DblIntToFloatE f, int i) {
return (d) -> f.call(d, i);
}
/**
* Binds {@code (i)} to the end of {@code this}, returning a new function
* of type {@code (double) -> float}.
*
* @param i argument 2
* @return a new function {@code (double d) -> float} that calls
* {@code this.call(d, i)} and returns the result.
*/
default net.mintern.functions.unary.checked.DblToFloatE rbind(int i) {
return DblIntToFloatE.rbind(this, i);
}
/**
* Binds {@code (d, i)} to {@code f}, returning a new function
* of type {@code () -> float}.
*
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param d argument 1
* @param i argument 2
* @return a new function {@code () -> float} that calls
* {@code f.call(d, i)} and returns the result.
*/
static net.mintern.functions.nullary.checked.NilToFloatE
bind(DblIntToFloatE f, double d, int i) {
return () -> f.call(d, i);
}
/**
* Binds {@code (d, i)} to {@code this}, returning a new function
* of type {@code () -> float}.
*
* @param d argument 1
* @param i argument 2
* @return a new function {@code () -> float} that calls
* {@code this.call(d, i)} and returns the result.
*/
default net.mintern.functions.nullary.checked.NilToFloatE bind(double d, int i) {
return DblIntToFloatE.bind(this, d, i);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy