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

ternary.checked.IntDblLongToDblE Maven / Gradle / Ivy

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

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

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

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

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

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

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

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

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy