package com.tykj.base.consumer;

import java.util.Objects;


/**
 * @Description TODO
 * @Author WWW
 * @Date 2021/7/5 17:28
 */

@FunctionalInterface
public interface FourComsumer<T, Y, U, I> {

    /**
     * accept
     * @param t
     * @param y
     * @param u
     * @param i
     */
    void accept(T t, Y y, U u, I i);

    /**
     * andThen
     * @param after
     * @return
     */
    default FourComsumer<T, Y, U, I> andThen(FourComsumer<? super T, ? super Y, ? super U, ? super I> after) {
        Objects.requireNonNull(after);

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

}
