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

net.mintern.functions.ternary.checked.ObjLongObjToBoolE 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, long, V) -> boolean}.
 *
 * @param  the type of argument 1
 * @param  the type of argument 3
 * @param  the {@code Exception} type that the operation may throw
 */
@FunctionalInterface
public interface ObjLongObjToBoolE {

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

    /**
     * Binds {@code (t)} to the beginning of {@code f}, returning a new function
     * of type {@code (long, V) -> boolean}.
     *
     * @param  the type of argument 1
     * @param  the type of argument 3
     * @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, V v) -> boolean} that calls
     *      {@code f.call(t, l, v)} and returns the result.
     */
    static  net.mintern.functions.binary.checked.LongObjToBoolE
    bind(ObjLongObjToBoolE f, T t) {
        return (l, v) -> f.call(t, l, v);
    }

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

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

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

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

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

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

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

    /**
     * Binds {@code (t, l, v)} to {@code f}, returning a new function
     * of type {@code () -> boolean}.
     *
     * @param  the type of argument 1
     * @param  the type of argument 3
     * @param  the {@code Exception} type that the operation may throw
     * @param f the unbound function
     * @param t argument 1
     * @param l argument 2
     * @param v argument 3
     * @return a new function {@code () -> boolean} that calls
     *      {@code f.call(t, l, v)} and returns the result.
     */
    static  net.mintern.functions.nullary.checked.NilToBoolE
    bind(ObjLongObjToBoolE f, T t, long l, V v) {
        return () -> f.call(t, l, v);
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy