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

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

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

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

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy