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