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