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

binary.checked.LongLongToByteE Maven / Gradle / Ivy

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

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

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

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

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy