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

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

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

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

    /**
     * Performs this operation.
     *
     * @param l argument 1
     * @param fl argument 2
     * @return the result of the operation
     * @throws E if the operation cannot be completed
     */
    byte call(long l, float fl) throws E;

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

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

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy