All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.mintern.functions.ternary.checked.LongObjLongToDblE Maven / Gradle / Ivy

There is a newer version: 2.0
Show newest version
package net.mintern.functions.ternary.checked;

/**
 * An operation of type {@code (long, U, long) -> double}.
 *
 * @param  the type of argument 2
 * @param  the {@code Exception} type that the operation may throw
 */
@FunctionalInterface
public interface LongObjLongToDblE {

    /**
     * Performs this operation.
     *
     * @param l1 argument 1
     * @param u argument 2
     * @param l3 argument 3
     * @return the result of the operation
     * @throws E if the operation cannot be completed
     */
    double 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) -> double}.
     *
     * @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) -> double} that calls
     *      {@code f.call(l1, u, l3)} and returns the result.
     */
    static  net.mintern.functions.binary.checked.ObjLongToDblE
    bind(LongObjLongToDblE 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) -> double}.
     *
     * @param l1 argument 1
     * @return a new function {@code (U u, long l3) -> double} that calls
     *      {@code this.call(l1, u, l3)} and returns the result.
     */
    default net.mintern.functions.binary.checked.ObjLongToDblE bind(long l1) {
        return LongObjLongToDblE.bind(this, l1);
    }

    /**
     * Binds {@code (u, l3)} to the end of {@code f}, returning a new function
     * of type {@code (long) -> double}.
     *
     * @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) -> double} that calls
     *      {@code f.call(l1, u, l3)} and returns the result.
     */
    static  net.mintern.functions.unary.checked.LongToDblE
    rbind(LongObjLongToDblE 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) -> double}.
     *
     * @param u argument 2
     * @param l3 argument 3
     * @return a new function {@code (long l1) -> double} that calls
     *      {@code this.call(l1, u, l3)} and returns the result.
     */
    default net.mintern.functions.unary.checked.LongToDblE rbind(U u, long l3) {
        return LongObjLongToDblE.rbind(this, u, l3);
    }

    /**
     * Binds {@code (l1, u)} to the beginning of {@code f}, returning a new function
     * of type {@code (long) -> double}.
     *
     * @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) -> double} that calls
     *      {@code f.call(l1, u, l3)} and returns the result.
     */
    static  net.mintern.functions.unary.checked.LongToDblE
    bind(LongObjLongToDblE 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) -> double}.
     *
     * @param l1 argument 1
     * @param u argument 2
     * @return a new function {@code (long l3) -> double} that calls
     *      {@code this.call(l1, u, l3)} and returns the result.
     */
    default net.mintern.functions.unary.checked.LongToDblE bind(long l1, U u) {
        return LongObjLongToDblE.bind(this, l1, u);
    }

    /**
     * Binds {@code (l3)} to the end of {@code f}, returning a new function
     * of type {@code (long, U) -> double}.
     *
     * @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) -> double} that calls
     *      {@code f.call(l1, u, l3)} and returns the result.
     */
    static  net.mintern.functions.binary.checked.LongObjToDblE
    rbind(LongObjLongToDblE 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) -> double}.
     *
     * @param l3 argument 3
     * @return a new function {@code (long l1, U u) -> double} that calls
     *      {@code this.call(l1, u, l3)} and returns the result.
     */
    default net.mintern.functions.binary.checked.LongObjToDblE rbind(long l3) {
        return LongObjLongToDblE.rbind(this, l3);
    }

    /**
     * Binds {@code (l1, u, l3)} to {@code f}, returning a new function
     * of type {@code () -> double}.
     *
     * @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 () -> double} that calls
     *      {@code f.call(l1, u, l3)} and returns the result.
     */
    static  net.mintern.functions.nullary.checked.NilToDblE
    bind(LongObjLongToDblE 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 () -> double}.
     *
     * @param l1 argument 1
     * @param u argument 2
     * @param l3 argument 3
     * @return a new function {@code () -> double} that calls
     *      {@code this.call(l1, u, l3)} and returns the result.
     */
    default net.mintern.functions.nullary.checked.NilToDblE bind(long l1, U u, long l3) {
        return LongObjLongToDblE.bind(this, l1, u, l3);
    }
}