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

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

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

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

    /**
     * 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
     */
    boolean 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) -> boolean}.
     *
     * @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) -> boolean} that calls
     *      {@code f.call(l1, l2, d)} and returns the result.
     */
    static  net.mintern.functions.binary.checked.LongDblToBoolE
    bind(LongLongDblToBoolE 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) -> boolean}.
     *
     * @param l1 argument 1
     * @return a new function {@code (long l2, double d) -> boolean} that calls
     *      {@code this.call(l1, l2, d)} and returns the result.
     */
    default net.mintern.functions.binary.checked.LongDblToBoolE bind(long l1) {
        return LongLongDblToBoolE.bind(this, l1);
    }

    /**
     * Binds {@code (l2, 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 l2 argument 2
     * @param d argument 3
     * @return a new function {@code (long l1) -> boolean} that calls
     *      {@code f.call(l1, l2, d)} and returns the result.
     */
    static  net.mintern.functions.unary.checked.LongToBoolE
    rbind(LongLongDblToBoolE 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) -> boolean}.
     *
     * @param l2 argument 2
     * @param d argument 3
     * @return a new function {@code (long l1) -> boolean} that calls
     *      {@code this.call(l1, l2, d)} and returns the result.
     */
    default net.mintern.functions.unary.checked.LongToBoolE rbind(long l2, double d) {
        return LongLongDblToBoolE.rbind(this, l2, d);
    }

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

    /**
     * Binds {@code (d)} to the end of {@code f}, returning a new function
     * of type {@code (long, long) -> 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 l1, long l2) -> boolean} that calls
     *      {@code f.call(l1, l2, d)} and returns the result.
     */
    static  net.mintern.functions.binary.checked.LongLongToBoolE
    rbind(LongLongDblToBoolE 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) -> boolean}.
     *
     * @param d argument 3
     * @return a new function {@code (long l1, long l2) -> boolean} that calls
     *      {@code this.call(l1, l2, d)} and returns the result.
     */
    default net.mintern.functions.binary.checked.LongLongToBoolE rbind(double d) {
        return LongLongDblToBoolE.rbind(this, d);
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy