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

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

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

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

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

    /**
     * Binds {@code (t)} to the beginning of {@code f}, returning a new function
     * of type {@code (long) -> char}.
     *
     * @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 (long l) -> char} that calls
     *      {@code f.call(t, l)} and returns the result.
     */
    static  net.mintern.functions.unary.checked.LongToCharE
    bind(ObjLongToCharE f, T t) {
        return (l) -> f.call(t, l);
    }

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

    /**
     * Binds {@code (l)} to the end of {@code f}, returning a new function
     * of type {@code (T) -> char}.
     *
     * @param  the type of argument 1
     * @param  the {@code Exception} type that the operation may throw
     * @param f the unbound function
     * @param l argument 2
     * @return a new function {@code (T t) -> char} that calls
     *      {@code f.call(t, l)} and returns the result.
     */
    static  net.mintern.functions.unary.checked.ObjToCharE
    rbind(ObjLongToCharE f, long l) {
        return (t) -> f.call(t, l);
    }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy