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

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

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

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

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy