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