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

net.mintern.functions.ternary.checked.LongIntObjToObjE Maven / Gradle / Ivy

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

/**
 * An operation of type {@code (long, int, V) -> R}.
 *
 * @param  the type of argument 3
 * @param  the type of the return value
 * @param  the {@code Exception} type that the operation may throw
 */
@FunctionalInterface
public interface LongIntObjToObjE {

    /**
     * Performs this operation.
     *
     * @param l argument 1
     * @param i argument 2
     * @param v argument 3
     * @return the result of the operation
     * @throws E if the operation cannot be completed
     */
    R call(long l, int i, V v) throws E;

    /**
     * Binds {@code (l)} to the beginning of {@code f}, returning a new function
     * of type {@code (int, V) -> R}.
     *
     * @param  the type of argument 3
     * @param  the type of the return value
     * @param  the {@code Exception} type that the operation may throw
     * @param f the unbound function
     * @param l argument 1
     * @return a new function {@code (int i, V v) -> R} that calls
     *      {@code f.call(l, i, v)} and returns the result.
     */
    static  net.mintern.functions.binary.checked.IntObjToObjE
    bind(LongIntObjToObjE f, long l) {
        return (i, v) -> f.call(l, i, v);
    }

    /**
     * Binds {@code (l)} to the beginning of {@code this}, returning a new function
     * of type {@code (int, V) -> R}.
     *
     * @param l argument 1
     * @return a new function {@code (int i, V v) -> R} that calls
     *      {@code this.call(l, i, v)} and returns the result.
     */
    default net.mintern.functions.binary.checked.IntObjToObjE bind(long l) {
        return LongIntObjToObjE.bind(this, l);
    }

    /**
     * Binds {@code (i, v)} to the end of {@code f}, returning a new function
     * of type {@code (long) -> R}.
     *
     * @param  the type of argument 3
     * @param  the type of the return value
     * @param  the {@code Exception} type that the operation may throw
     * @param f the unbound function
     * @param i argument 2
     * @param v argument 3
     * @return a new function {@code (long l) -> R} that calls
     *      {@code f.call(l, i, v)} and returns the result.
     */
    static  net.mintern.functions.unary.checked.LongToObjE
    rbind(LongIntObjToObjE f, int i, V v) {
        return (l) -> f.call(l, i, v);
    }

    /**
     * Binds {@code (i, v)} to the end of {@code this}, returning a new function
     * of type {@code (long) -> R}.
     *
     * @param i argument 2
     * @param v argument 3
     * @return a new function {@code (long l) -> R} that calls
     *      {@code this.call(l, i, v)} and returns the result.
     */
    default net.mintern.functions.unary.checked.LongToObjE rbind(int i, V v) {
        return LongIntObjToObjE.rbind(this, i, v);
    }

    /**
     * Binds {@code (l, i)} to the beginning of {@code f}, returning a new function
     * of type {@code (V) -> R}.
     *
     * @param  the type of argument 3
     * @param  the type of the return value
     * @param  the {@code Exception} type that the operation may throw
     * @param f the unbound function
     * @param l argument 1
     * @param i argument 2
     * @return a new function {@code (V v) -> R} that calls
     *      {@code f.call(l, i, v)} and returns the result.
     */
    static  net.mintern.functions.unary.checked.ObjToObjE
    bind(LongIntObjToObjE f, long l, int i) {
        return (v) -> f.call(l, i, v);
    }

    /**
     * Binds {@code (l, i)} to the beginning of {@code this}, returning a new function
     * of type {@code (V) -> R}.
     *
     * @param l argument 1
     * @param i argument 2
     * @return a new function {@code (V v) -> R} that calls
     *      {@code this.call(l, i, v)} and returns the result.
     */
    default net.mintern.functions.unary.checked.ObjToObjE bind(long l, int i) {
        return LongIntObjToObjE.bind(this, l, i);
    }

    /**
     * Binds {@code (v)} to the end of {@code f}, returning a new function
     * of type {@code (long, int) -> R}.
     *
     * @param  the type of argument 3
     * @param  the type of the return value
     * @param  the {@code Exception} type that the operation may throw
     * @param f the unbound function
     * @param v argument 3
     * @return a new function {@code (long l, int i) -> R} that calls
     *      {@code f.call(l, i, v)} and returns the result.
     */
    static  net.mintern.functions.binary.checked.LongIntToObjE
    rbind(LongIntObjToObjE f, V v) {
        return (l, i) -> f.call(l, i, v);
    }

    /**
     * Binds {@code (v)} to the end of {@code this}, returning a new function
     * of type {@code (long, int) -> R}.
     *
     * @param v argument 3
     * @return a new function {@code (long l, int i) -> R} that calls
     *      {@code this.call(l, i, v)} and returns the result.
     */
    default net.mintern.functions.binary.checked.LongIntToObjE rbind(V v) {
        return LongIntObjToObjE.rbind(this, v);
    }

    /**
     * Binds {@code (l, i, v)} to {@code f}, returning a new function
     * of type {@code () -> R}.
     *
     * @param  the type of argument 3
     * @param  the type of the return value
     * @param  the {@code Exception} type that the operation may throw
     * @param f the unbound function
     * @param l argument 1
     * @param i argument 2
     * @param v argument 3
     * @return a new function {@code () -> R} that calls
     *      {@code f.call(l, i, v)} and returns the result.
     */
    @SuppressWarnings("unchecked") // maven spuriously warns about a type error in this case
    static  net.mintern.functions.nullary.checked.NilToObjE
    bind(LongIntObjToObjE f, long l, int i, V v) {
        return () -> f.call(l, i, v);
    }

    /**
     * Binds {@code (l, i, v)} to {@code this}, returning a new function
     * of type {@code () -> R}.
     *
     * @param l argument 1
     * @param i argument 2
     * @param v argument 3
     * @return a new function {@code () -> R} that calls
     *      {@code this.call(l, i, v)} and returns the result.
     */
    default net.mintern.functions.nullary.checked.NilToObjE bind(long l, int i, V v) {
        return LongIntObjToObjE.bind(this, l, i, v);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy