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

ternary.checked.ObjObjIntToNilE Maven / Gradle / Ivy

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

/**
 * An operation of type {@code (T, U, int) -> void}.
 *
 * @param  the type of argument 1
 * @param  the type of argument 2
 * @param  the {@code Exception} type that the operation may throw
 */
@FunctionalInterface
public interface ObjObjIntToNilE {

    /**
     * Performs this operation.
     *
     * @param t argument 1
     * @param u argument 2
     * @param i argument 3
     * @throws E if the operation cannot be completed
     */
    void call(T t, U u, int i) throws E;

    /**
     * Binds {@code (t)} to the beginning of {@code f}, returning a new function
     * of type {@code (U, int) -> void}.
     *
     * @param  the type of argument 1
     * @param  the type of argument 2
     * @param  the {@code Exception} type that the operation may throw
     * @param f the unbound function
     * @param t argument 1
     * @return a new function {@code (U u, int i) -> void} that calls
     *      {@code f.call(t, u, i)}.
     */
    static  net.mintern.functions.binary.checked.ObjIntToNilE
    bind(ObjObjIntToNilE f, T t) {
        return (u, i) -> f.call(t, u, i);
    }

    /**
     * Binds {@code (t)} to the beginning of {@code this}, returning a new function
     * of type {@code (U, int) -> void}.
     *
     * @param t argument 1
     * @return a new function {@code (U u, int i) -> void} that calls
     *      {@code this.call(t, u, i)}.
     */
    default net.mintern.functions.binary.checked.ObjIntToNilE bind(T t) {
        return ObjObjIntToNilE.bind(this, t);
    }

    /**
     * Binds {@code (u, i)} to the end of {@code f}, returning a new function
     * of type {@code (T) -> void}.
     *
     * @param  the type of argument 1
     * @param  the type of argument 2
     * @param  the {@code Exception} type that the operation may throw
     * @param f the unbound function
     * @param u argument 2
     * @param i argument 3
     * @return a new function {@code (T t) -> void} that calls
     *      {@code f.call(t, u, i)}.
     */
    static  net.mintern.functions.unary.checked.ObjToNilE
    rbind(ObjObjIntToNilE f, U u, int i) {
        return (t) -> f.call(t, u, i);
    }

    /**
     * Binds {@code (u, i)} to the end of {@code this}, returning a new function
     * of type {@code (T) -> void}.
     *
     * @param u argument 2
     * @param i argument 3
     * @return a new function {@code (T t) -> void} that calls
     *      {@code this.call(t, u, i)}.
     */
    default net.mintern.functions.unary.checked.ObjToNilE rbind(U u, int i) {
        return ObjObjIntToNilE.rbind(this, u, i);
    }

    /**
     * Binds {@code (t, u)} to the beginning of {@code f}, returning a new function
     * of type {@code (int) -> void}.
     *
     * @param  the type of argument 1
     * @param  the type of argument 2
     * @param  the {@code Exception} type that the operation may throw
     * @param f the unbound function
     * @param t argument 1
     * @param u argument 2
     * @return a new function {@code (int i) -> void} that calls
     *      {@code f.call(t, u, i)}.
     */
    static  net.mintern.functions.unary.checked.IntToNilE
    bind(ObjObjIntToNilE f, T t, U u) {
        return (i) -> f.call(t, u, i);
    }

    /**
     * Binds {@code (t, u)} to the beginning of {@code this}, returning a new function
     * of type {@code (int) -> void}.
     *
     * @param t argument 1
     * @param u argument 2
     * @return a new function {@code (int i) -> void} that calls
     *      {@code this.call(t, u, i)}.
     */
    default net.mintern.functions.unary.checked.IntToNilE bind(T t, U u) {
        return ObjObjIntToNilE.bind(this, t, u);
    }

    /**
     * Binds {@code (i)} to the end of {@code f}, returning a new function
     * of type {@code (T, U) -> void}.
     *
     * @param  the type of argument 1
     * @param  the type of argument 2
     * @param  the {@code Exception} type that the operation may throw
     * @param f the unbound function
     * @param i argument 3
     * @return a new function {@code (T t, U u) -> void} that calls
     *      {@code f.call(t, u, i)}.
     */
    static  net.mintern.functions.binary.checked.ObjObjToNilE
    rbind(ObjObjIntToNilE f, int i) {
        return (t, u) -> f.call(t, u, i);
    }

    /**
     * Binds {@code (i)} to the end of {@code this}, returning a new function
     * of type {@code (T, U) -> void}.
     *
     * @param i argument 3
     * @return a new function {@code (T t, U u) -> void} that calls
     *      {@code this.call(t, u, i)}.
     */
    default net.mintern.functions.binary.checked.ObjObjToNilE rbind(int i) {
        return ObjObjIntToNilE.rbind(this, i);
    }

    /**
     * Binds {@code (t, u, i)} to {@code f}, returning a new function
     * of type {@code () -> void}.
     *
     * @param  the type of argument 1
     * @param  the type of argument 2
     * @param  the {@code Exception} type that the operation may throw
     * @param f the unbound function
     * @param t argument 1
     * @param u argument 2
     * @param i argument 3
     * @return a new function {@code () -> void} that calls
     *      {@code f.call(t, u, i)}.
     */
    static  net.mintern.functions.nullary.checked.NilToNilE
    bind(ObjObjIntToNilE f, T t, U u, int i) {
        return () -> f.call(t, u, i);
    }

    /**
     * Binds {@code (t, u, i)} to {@code this}, returning a new function
     * of type {@code () -> void}.
     *
     * @param t argument 1
     * @param u argument 2
     * @param i argument 3
     * @return a new function {@code () -> void} that calls
     *      {@code this.call(t, u, i)}.
     */
    default net.mintern.functions.nullary.checked.NilToNilE bind(T t, U u, int i) {
        return ObjObjIntToNilE.bind(this, t, u, i);
    }
}