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

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

    /**
     * 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
     */
    byte call(float fl1, float fl2) throws E;

    /**
     * Binds {@code (fl1)} to the beginning of {@code f}, returning a new function
     * of type {@code (float) -> byte}.
     *
     * @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) -> byte} that calls
     *      {@code f.call(fl1, fl2)} and returns the result.
     */
    static  net.mintern.functions.unary.checked.FloatToByteE
    bind(FloatFloatToByteE 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) -> byte}.
     *
     * @param fl1 argument 1
     * @return a new function {@code (float fl2) -> byte} that calls
     *      {@code this.call(fl1, fl2)} and returns the result.
     */
    default net.mintern.functions.unary.checked.FloatToByteE bind(float fl1) {
        return FloatFloatToByteE.bind(this, fl1);
    }

    /**
     * Binds {@code (fl2)} to the end of {@code f}, returning a new function
     * of type {@code (float) -> byte}.
     *
     * @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) -> byte} that calls
     *      {@code f.call(fl1, fl2)} and returns the result.
     */
    static  net.mintern.functions.unary.checked.FloatToByteE
    rbind(FloatFloatToByteE 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) -> byte}.
     *
     * @param fl2 argument 2
     * @return a new function {@code (float fl1) -> byte} that calls
     *      {@code this.call(fl1, fl2)} and returns the result.
     */
    default net.mintern.functions.unary.checked.FloatToByteE rbind(float fl2) {
        return FloatFloatToByteE.rbind(this, fl2);
    }

    /**
     * Binds {@code (fl1, fl2)} to {@code f}, returning a new function
     * of type {@code () -> byte}.
     *
     * @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 () -> byte} that calls
     *      {@code f.call(fl1, fl2)} and returns the result.
     */
    static  net.mintern.functions.nullary.checked.NilToByteE
    bind(FloatFloatToByteE f, float fl1, float fl2) {
        return () -> f.call(fl1, fl2);
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy