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

binary.checked.ObjDblToFloatE Maven / Gradle / Ivy

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

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

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

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

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy