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

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

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy