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

net.mintern.functions.ternary.checked.LongLongDblToDblE 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, long, double) -> double}.
 *
 * @param  the {@code Exception} type that the operation may throw
 */
@FunctionalInterface
public interface LongLongDblToDblE {

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

    /**
     * Binds {@code (l1)} to the beginning of {@code f}, returning a new function
     * of type {@code (long, double) -> double}.
     *
     * @param  the {@code Exception} type that the operation may throw
     * @param f the unbound function
     * @param l1 argument 1
     * @return a new function {@code (long l2, double d) -> double} that calls
     *      {@code f.call(l1, l2, d)} and returns the result.
     */
    static  net.mintern.functions.binary.checked.LongDblToDblE
    bind(LongLongDblToDblE f, long l1) {
        return (l2, d) -> f.call(l1, l2, d);
    }

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

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

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

    /**
     * Binds {@code (l1, l2)} to the beginning of {@code f}, returning a new function
     * of type {@code (double) -> double}.
     *
     * @param  the {@code Exception} type that the operation may throw
     * @param f the unbound function
     * @param l1 argument 1
     * @param l2 argument 2
     * @return a new function {@code (double d) -> double} that calls
     *      {@code f.call(l1, l2, d)} and returns the result.
     */
    static  net.mintern.functions.unary.checked.DblToDblE
    bind(LongLongDblToDblE f, long l1, long l2) {
        return (d) -> f.call(l1, l2, d);
    }

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

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

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

    /**
     * Binds {@code (l1, l2, d)} to {@code f}, returning a new function
     * of type {@code () -> double}.
     *
     * @param  the {@code Exception} type that the operation may throw
     * @param f the unbound function
     * @param l1 argument 1
     * @param l2 argument 2
     * @param d argument 3
     * @return a new function {@code () -> double} that calls
     *      {@code f.call(l1, l2, d)} and returns the result.
     */
    static  net.mintern.functions.nullary.checked.NilToDblE
    bind(LongLongDblToDblE f, long l1, long l2, double d) {
        return () -> f.call(l1, l2, d);
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy