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