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

net.mintern.functions.ternary.checked.LongIntDblToLongE 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) -> long}.
 *
 * @param  the {@code Exception} type that the operation may throw
 */
@FunctionalInterface
public interface LongIntDblToLongE {

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy