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

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

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

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

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

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

    /**
     * Binds {@code (d, l, i)} to {@code f}, returning a new function
     * of type {@code () -> R}.
     *
     * @param  the type of the return value
     * @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 () -> R} that calls
     *      {@code f.call(d, l, i)} and returns the result.
     */
    @SuppressWarnings("unchecked") // maven spuriously warns about a type error in this case
    static  net.mintern.functions.nullary.checked.NilToObjE
    bind(DblLongIntToObjE 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 () -> R}.
     *
     * @param d argument 1
     * @param l argument 2
     * @param i argument 3
     * @return a new function {@code () -> R} that calls
     *      {@code this.call(d, l, i)} and returns the result.
     */
    default net.mintern.functions.nullary.checked.NilToObjE bind(double d, long l, int i) {
        return DblLongIntToObjE.bind(this, d, l, i);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy