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

binary.checked.FloatFloatToDblE Maven / Gradle / Ivy

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

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

    /**
     * Performs this operation.
     *
     * @param fl1 argument 1
     * @param fl2 argument 2
     * @return the result of the operation
     * @throws E if the operation cannot be completed
     */
    double call(float fl1, float fl2) throws E;

    /**
     * Binds {@code (fl1)} to the beginning of {@code f}, returning a new function
     * of type {@code (float) -> double}.
     *
     * @param  the {@code Exception} type that the operation may throw
     * @param f the unbound function
     * @param fl1 argument 1
     * @return a new function {@code (float fl2) -> double} that calls
     *      {@code f.call(fl1, fl2)} and returns the result.
     */
    static  net.mintern.functions.unary.checked.FloatToDblE
    bind(FloatFloatToDblE f, float fl1) {
        return (fl2) -> f.call(fl1, fl2);
    }

    /**
     * Binds {@code (fl1)} to the beginning of {@code this}, returning a new function
     * of type {@code (float) -> double}.
     *
     * @param fl1 argument 1
     * @return a new function {@code (float fl2) -> double} that calls
     *      {@code this.call(fl1, fl2)} and returns the result.
     */
    default net.mintern.functions.unary.checked.FloatToDblE bind(float fl1) {
        return FloatFloatToDblE.bind(this, fl1);
    }

    /**
     * Binds {@code (fl2)} to the end of {@code f}, returning a new function
     * of type {@code (float) -> double}.
     *
     * @param  the {@code Exception} type that the operation may throw
     * @param f the unbound function
     * @param fl2 argument 2
     * @return a new function {@code (float fl1) -> double} that calls
     *      {@code f.call(fl1, fl2)} and returns the result.
     */
    static  net.mintern.functions.unary.checked.FloatToDblE
    rbind(FloatFloatToDblE f, float fl2) {
        return (fl1) -> f.call(fl1, fl2);
    }

    /**
     * Binds {@code (fl2)} to the end of {@code this}, returning a new function
     * of type {@code (float) -> double}.
     *
     * @param fl2 argument 2
     * @return a new function {@code (float fl1) -> double} that calls
     *      {@code this.call(fl1, fl2)} and returns the result.
     */
    default net.mintern.functions.unary.checked.FloatToDblE rbind(float fl2) {
        return FloatFloatToDblE.rbind(this, fl2);
    }

    /**
     * Binds {@code (fl1, fl2)} to {@code f}, returning a new function
     * of type {@code () -> double}.
     *
     * @param  the {@code Exception} type that the operation may throw
     * @param f the unbound function
     * @param fl1 argument 1
     * @param fl2 argument 2
     * @return a new function {@code () -> double} that calls
     *      {@code f.call(fl1, fl2)} and returns the result.
     */
    static  net.mintern.functions.nullary.checked.NilToDblE
    bind(FloatFloatToDblE f, float fl1, float fl2) {
        return () -> f.call(fl1, fl2);
    }

    /**
     * Binds {@code (fl1, fl2)} to {@code this}, returning a new function
     * of type {@code () -> double}.
     *
     * @param fl1 argument 1
     * @param fl2 argument 2
     * @return a new function {@code () -> double} that calls
     *      {@code this.call(fl1, fl2)} and returns the result.
     */
    default net.mintern.functions.nullary.checked.NilToDblE bind(float fl1, float fl2) {
        return FloatFloatToDblE.bind(this, fl1, fl2);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy