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