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

ternary.checked.DblLongIntToLongE Maven / Gradle / Ivy

There is a newer version: 2.0
Show newest version
package net.mintern.functions.ternary.checked;

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

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

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

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

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

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

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

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy