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

binary.checked.FloatLongToDblE 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, long) -> double}.
 *
 * @param  the {@code Exception} type that the operation may throw
 */
@FunctionalInterface
public interface FloatLongToDblE {

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

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

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

    /**
     * Binds {@code (l)} 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 l argument 2
     * @return a new function {@code (float fl) -> double} that calls
     *      {@code f.call(fl, l)} and returns the result.
     */
    static  net.mintern.functions.unary.checked.FloatToDblE
    rbind(FloatLongToDblE f, long l) {
        return (fl) -> f.call(fl, l);
    }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy