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

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

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

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

    /**
     * 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
     */
    char call(long l1, long l2) throws E;

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

    /**
     * Binds {@code (l2)} to the end of {@code f}, returning a new function
     * of type {@code (long) -> char}.
     *
     * @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) -> char} that calls
     *      {@code f.call(l1, l2)} and returns the result.
     */
    static  net.mintern.functions.unary.checked.LongToCharE
    rbind(LongLongToCharE 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) -> char}.
     *
     * @param l2 argument 2
     * @return a new function {@code (long l1) -> char} that calls
     *      {@code this.call(l1, l2)} and returns the result.
     */
    default net.mintern.functions.unary.checked.LongToCharE rbind(long l2) {
        return LongLongToCharE.rbind(this, l2);
    }

    /**
     * Binds {@code (l1, l2)} to {@code f}, returning a new function
     * of type {@code () -> char}.
     *
     * @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 () -> char} that calls
     *      {@code f.call(l1, l2)} and returns the result.
     */
    static  net.mintern.functions.nullary.checked.NilToCharE
    bind(LongLongToCharE f, long l1, long l2) {
        return () -> f.call(l1, l2);
    }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy