net.mintern.functions.ternary.checked.LongObjLongToNilE Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of functions-ternary-core Show documentation
Show all versions of functions-ternary-core Show documentation
Provides functional interfaces for the most commonly used two-argument functions
package net.mintern.functions.ternary.checked;
/**
* An operation of type {@code (long, U, long) -> void}.
*
* @param the type of argument 2
* @param the {@code Exception} type that the operation may throw
*/
@FunctionalInterface
public interface LongObjLongToNilE {
/**
* Performs this operation.
*
* @param l1 argument 1
* @param u argument 2
* @param l3 argument 3
* @throws E if the operation cannot be completed
*/
void call(long l1, U u, long l3) throws E;
/**
* Binds {@code (l1)} to the beginning of {@code f}, returning a new function
* of type {@code (U, long) -> void}.
*
* @param the type of argument 2
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param l1 argument 1
* @return a new function {@code (U u, long l3) -> void} that calls
* {@code f.call(l1, u, l3)}.
*/
static net.mintern.functions.binary.checked.ObjLongToNilE
bind(LongObjLongToNilE f, long l1) {
return (u, l3) -> f.call(l1, u, l3);
}
/**
* Binds {@code (l1)} to the beginning of {@code this}, returning a new function
* of type {@code (U, long) -> void}.
*
* @param l1 argument 1
* @return a new function {@code (U u, long l3) -> void} that calls
* {@code this.call(l1, u, l3)}.
*/
default net.mintern.functions.binary.checked.ObjLongToNilE bind(long l1) {
return LongObjLongToNilE.bind(this, l1);
}
/**
* Binds {@code (u, l3)} to the end of {@code f}, returning a new function
* of type {@code (long) -> void}.
*
* @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
* @param l3 argument 3
* @return a new function {@code (long l1) -> void} that calls
* {@code f.call(l1, u, l3)}.
*/
static net.mintern.functions.unary.checked.LongToNilE
rbind(LongObjLongToNilE f, U u, long l3) {
return (l1) -> f.call(l1, u, l3);
}
/**
* Binds {@code (u, l3)} to the end of {@code this}, returning a new function
* of type {@code (long) -> void}.
*
* @param u argument 2
* @param l3 argument 3
* @return a new function {@code (long l1) -> void} that calls
* {@code this.call(l1, u, l3)}.
*/
default net.mintern.functions.unary.checked.LongToNilE rbind(U u, long l3) {
return LongObjLongToNilE.rbind(this, u, l3);
}
/**
* Binds {@code (l1, u)} to the beginning of {@code f}, returning a new function
* of type {@code (long) -> void}.
*
* @param the type of argument 2
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param l1 argument 1
* @param u argument 2
* @return a new function {@code (long l3) -> void} that calls
* {@code f.call(l1, u, l3)}.
*/
static net.mintern.functions.unary.checked.LongToNilE
bind(LongObjLongToNilE f, long l1, U u) {
return (l3) -> f.call(l1, u, l3);
}
/**
* Binds {@code (l1, u)} to the beginning of {@code this}, returning a new function
* of type {@code (long) -> void}.
*
* @param l1 argument 1
* @param u argument 2
* @return a new function {@code (long l3) -> void} that calls
* {@code this.call(l1, u, l3)}.
*/
default net.mintern.functions.unary.checked.LongToNilE bind(long l1, U u) {
return LongObjLongToNilE.bind(this, l1, u);
}
/**
* Binds {@code (l3)} to the end of {@code f}, returning a new function
* of type {@code (long, U) -> void}.
*
* @param the type of argument 2
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param l3 argument 3
* @return a new function {@code (long l1, U u) -> void} that calls
* {@code f.call(l1, u, l3)}.
*/
static net.mintern.functions.binary.checked.LongObjToNilE
rbind(LongObjLongToNilE f, long l3) {
return (l1, u) -> f.call(l1, u, l3);
}
/**
* Binds {@code (l3)} to the end of {@code this}, returning a new function
* of type {@code (long, U) -> void}.
*
* @param l3 argument 3
* @return a new function {@code (long l1, U u) -> void} that calls
* {@code this.call(l1, u, l3)}.
*/
default net.mintern.functions.binary.checked.LongObjToNilE rbind(long l3) {
return LongObjLongToNilE.rbind(this, l3);
}
/**
* Binds {@code (l1, u, l3)} to {@code f}, returning a new function
* of type {@code () -> void}.
*
* @param the type of argument 2
* @param the {@code Exception} type that the operation may throw
* @param f the unbound function
* @param l1 argument 1
* @param u argument 2
* @param l3 argument 3
* @return a new function {@code () -> void} that calls
* {@code f.call(l1, u, l3)}.
*/
static net.mintern.functions.nullary.checked.NilToNilE
bind(LongObjLongToNilE f, long l1, U u, long l3) {
return () -> f.call(l1, u, l3);
}
/**
* Binds {@code (l1, u, l3)} to {@code this}, returning a new function
* of type {@code () -> void}.
*
* @param l1 argument 1
* @param u argument 2
* @param l3 argument 3
* @return a new function {@code () -> void} that calls
* {@code this.call(l1, u, l3)}.
*/
default net.mintern.functions.nullary.checked.NilToNilE bind(long l1, U u, long l3) {
return LongObjLongToNilE.bind(this, l1, u, l3);
}
}