net.mintern.functions.binary.checked.DblIntToNilE Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of functions-binary-core Show documentation
Show all versions of functions-binary-core Show documentation
Provides functional interfaces for the most commonly used two-argument functions
The newest version!
package net.mintern.functions.binary.checked;
/**
* An operation of type {@code (double, int) -> void}.
*
* @param the {@code Exception} type that the operation may throw
*/
@FunctionalInterface
public interface DblIntToNilE {
/**
* Performs this operation.
*
* @param d argument 1
* @param i argument 2
* @throws E if the operation cannot be completed
*/
void call(double d, int i) throws E;
/**
* Binds {@code (d)} to the beginning of {@code f}, returning a new function
* of type {@code (int) -> void}.
*
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param d argument 1
* @return a new function {@code (int i) -> void} that calls
* {@code f.call(d, i)}.
*/
static net.mintern.functions.unary.checked.IntToNilE
bind(DblIntToNilE f, double d) {
return (i) -> f.call(d, i);
}
/**
* Binds {@code (d)} to the beginning of {@code this}, returning a new function
* of type {@code (int) -> void}.
*
* @param d argument 1
* @return a new function {@code (int i) -> void} that calls
* {@code this.call(d, i)}.
*/
default net.mintern.functions.unary.checked.IntToNilE bind(double d) {
return DblIntToNilE.bind(this, d);
}
/**
* Binds {@code (i)} to the end of {@code f}, returning a new function
* of type {@code (double) -> void}.
*
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param i argument 2
* @return a new function {@code (double d) -> void} that calls
* {@code f.call(d, i)}.
*/
static net.mintern.functions.unary.checked.DblToNilE
rbind(DblIntToNilE f, int i) {
return (d) -> f.call(d, i);
}
/**
* Binds {@code (i)} to the end of {@code this}, returning a new function
* of type {@code (double) -> void}.
*
* @param i argument 2
* @return a new function {@code (double d) -> void} that calls
* {@code this.call(d, i)}.
*/
default net.mintern.functions.unary.checked.DblToNilE rbind(int i) {
return DblIntToNilE.rbind(this, i);
}
/**
* Binds {@code (d, i)} to {@code f}, returning a new function
* of type {@code () -> void}.
*
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param d argument 1
* @param i argument 2
* @return a new function {@code () -> void} that calls
* {@code f.call(d, i)}.
*/
static net.mintern.functions.nullary.checked.NilToNilE
bind(DblIntToNilE f, double d, int i) {
return () -> f.call(d, i);
}
/**
* Binds {@code (d, i)} to {@code this}, returning a new function
* of type {@code () -> void}.
*
* @param d argument 1
* @param i argument 2
* @return a new function {@code () -> void} that calls
* {@code this.call(d, i)}.
*/
default net.mintern.functions.nullary.checked.NilToNilE bind(double d, int i) {
return DblIntToNilE.bind(this, d, i);
}
}