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