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