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

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

The newest version!
package net.mintern.functions.ternary.checked;

/**
 * An operation of type {@code (double, int, V) -> boolean}.
 *
 * @param  the type of argument 3
 * @param  the {@code Exception} type that the operation may throw
 */
@FunctionalInterface
public interface DblIntObjToBoolE {

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

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

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

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

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

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

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy