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

org.catools.common.functions.CTripleConsumer Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package org.catools.common.functions;

import java.util.Objects;

public interface CTripleConsumer {

    /**
     * Performs this operation on the given arguments.
     *
     * @param t the first input argument
     * @param u the second input argument
     * @param l the third input argument
     */
    void accept(T t, U u, L l);

    /**
     * Returns a composed {@code TripleConsumer} that performs, in sequence, this
     * operation followed by the {@code after} operation. If performing either
     * operation throws an exception, it is relayed to the caller of the
     * composed operation.  If performing this operation throws an exception,
     * the {@code after} operation will not be performed.
     *
     * @param after the operation to perform after this operation
     * @return a composed {@code TripleConsumer} that performs in sequence this
     * operation followed by the {@code after} operation
     * @throws NullPointerException if {@code after} is null
     */
    default CTripleConsumer andThen(CTripleConsumer after) {
        Objects.requireNonNull(after);

        return (t, u, l) -> {
            accept(t, u, l);
            after.accept(t, u, l);
        };
    }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy