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

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

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

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

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy