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

ternary.checked.DblObjLongToDblE Maven / Gradle / Ivy

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

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

    /**
     * Performs this operation.
     *
     * @param d argument 1
     * @param u argument 2
     * @param l argument 3
     * @return the result of the operation
     * @throws E if the operation cannot be completed
     */
    double call(double d, U u, long l) throws E;

    /**
     * Binds {@code (d)} 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 d argument 1
     * @return a new function {@code (U u, long l) -> double} that calls
     *      {@code f.call(d, u, l)} and returns the result.
     */
    static  net.mintern.functions.binary.checked.ObjLongToDblE
    bind(DblObjLongToDblE f, double d) {
        return (u, l) -> f.call(d, u, l);
    }

    /**
     * Binds {@code (d)} to the beginning of {@code this}, returning a new function
     * of type {@code (U, long) -> double}.
     *
     * @param d argument 1
     * @return a new function {@code (U u, long l) -> double} that calls
     *      {@code this.call(d, u, l)} and returns the result.
     */
    default net.mintern.functions.binary.checked.ObjLongToDblE bind(double d) {
        return DblObjLongToDblE.bind(this, d);
    }

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

    /**
     * Binds {@code (u, l)} to the end of {@code this}, returning a new function
     * of type {@code (double) -> double}.
     *
     * @param u argument 2
     * @param l argument 3
     * @return a new function {@code (double d) -> double} that calls
     *      {@code this.call(d, u, l)} and returns the result.
     */
    default net.mintern.functions.unary.checked.DblToDblE rbind(U u, long l) {
        return DblObjLongToDblE.rbind(this, u, l);
    }

    /**
     * Binds {@code (d, 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 d argument 1
     * @param u argument 2
     * @return a new function {@code (long l) -> double} that calls
     *      {@code f.call(d, u, l)} and returns the result.
     */
    static  net.mintern.functions.unary.checked.LongToDblE
    bind(DblObjLongToDblE f, double d, U u) {
        return (l) -> f.call(d, u, l);
    }

    /**
     * Binds {@code (d, u)} to the beginning of {@code this}, returning a new function
     * of type {@code (long) -> double}.
     *
     * @param d argument 1
     * @param u argument 2
     * @return a new function {@code (long l) -> double} that calls
     *      {@code this.call(d, u, l)} and returns the result.
     */
    default net.mintern.functions.unary.checked.LongToDblE bind(double d, U u) {
        return DblObjLongToDblE.bind(this, d, u);
    }

    /**
     * Binds {@code (l)} to the end of {@code f}, returning a new function
     * of type {@code (double, U) -> double}.
     *
     * @param  the type of argument 2
     * @param  the {@code Exception} type that the operation may throw
     * @param f the unbound function
     * @param l argument 3
     * @return a new function {@code (double d, U u) -> double} that calls
     *      {@code f.call(d, u, l)} and returns the result.
     */
    static  net.mintern.functions.binary.checked.DblObjToDblE
    rbind(DblObjLongToDblE f, long l) {
        return (d, u) -> f.call(d, u, l);
    }

    /**
     * Binds {@code (l)} to the end of {@code this}, returning a new function
     * of type {@code (double, U) -> double}.
     *
     * @param l argument 3
     * @return a new function {@code (double d, U u) -> double} that calls
     *      {@code this.call(d, u, l)} and returns the result.
     */
    default net.mintern.functions.binary.checked.DblObjToDblE rbind(long l) {
        return DblObjLongToDblE.rbind(this, l);
    }

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

    /**
     * Binds {@code (d, u, l)} to {@code this}, returning a new function
     * of type {@code () -> double}.
     *
     * @param d argument 1
     * @param u argument 2
     * @param l argument 3
     * @return a new function {@code () -> double} that calls
     *      {@code this.call(d, u, l)} and returns the result.
     */
    default net.mintern.functions.nullary.checked.NilToDblE bind(double d, U u, long l) {
        return DblObjLongToDblE.bind(this, d, u, l);
    }
}