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

net.mintern.functions.binary.checked.FloatLongToByteE Maven / Gradle / Ivy

The newest version!
package net.mintern.functions.binary.checked;

/**
 * An operation of type {@code (float, long) -> byte}.
 *
 * @param  the {@code Exception} type that the operation may throw
 */
@FunctionalInterface
public interface FloatLongToByteE {

    /**
     * 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
     */
    byte call(float fl, long l) throws E;

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy