Interface TriConsumer<T,​U,​V>

  • Type Parameters:
    T - the type of the first input
    U - the type of the second input
    V - the type of the third input
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface TriConsumer<T,​U,​V>
    Protocol for an action that accepts three inputs. This is the ternary variant of Consumer as BiConsumer is a binary variant of it.
    Since:
    1.22
    See Also:
    TriFunction, BiConsumer, Consumer
    • Method Detail

      • accept

        void accept​(T t,
                    U u,
                    V v)
        Accept the inputs and operate on them.
        Parameters:
        t - the first input
        u - the second input
        v - the third input
      • andThen

        default TriConsumer<T,​U,​V> andThen​(TriConsumer<? super T,​? super U,​? super V> after)
        Obtain a composed TriConsumer that performs me followed by an after operation. If the after consumer throws, then that exception is propagated to the caller. If I throw, then likewise but also the after consumer will not be invoked.
        Parameters:
        after - a consumer to invoke after me. Must not be null
        Returns:
        the composition of myself with the after consumer
        Throws:
        java.lang.NullPointerException - if after is null