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

ternary.checked.IntIntDblToBoolE 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, int, double) -> boolean}.
 *
 * @param  the {@code Exception} type that the operation may throw
 */
@FunctionalInterface
public interface IntIntDblToBoolE {

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

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

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

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

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

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

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy