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

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

    /**
     * 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
     */
    byte call(T t, double d) throws E;

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy