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

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

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

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

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

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

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

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

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

    /**
     * Binds {@code (d)} to the end of {@code f}, returning a new function
     * of type {@code (long, 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 (long l, int i) -> boolean} that calls
     *      {@code f.call(l, i, d)} and returns the result.
     */
    static  net.mintern.functions.binary.checked.LongIntToBoolE
    rbind(LongIntDblToBoolE f, double d) {
        return (l, i) -> f.call(l, i, d);
    }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy