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