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