Interface TriConsumer<X,​Y,​Z>

  • Type Parameters:
    X - the type of the first argument to the operation.
    Y - the type of the second argument to the operation.
    Z - the type of the third argument to the operation.
    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<X,​Y,​Z>
    Represents an operation that accepts three input arguments and returns no result. This is the three-arity specialization of Consumer. Unlike most other functional interfaces, TriConsumer is expected to operate via side-effects.
    Since:
    1.0
    Author:
    , Bobai Kato
    See Also:
    BiConsumer
    • Method Detail

      • andThen

        default TriConsumer<X,​Y,​Z> andThen​(TriConsumer<? super X,​? super Y,​? super Z> after)
        Returns a composed TriConsumer that performs, in sequence, this operation followed by the 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 after operation will not be performed.
        Parameters:
        after - the operation to perform after this operation
        Returns:
        a composed TriConsumer that performs in sequence this operation followed by the after operation
        Throws:
        NullPointerException - if after is null
      • accept

        void accept​(X x,
                    Y y,
                    Z z)
        Performs this operation on the given argument.
        Parameters:
        x - the first input argument
        y - the second input argument
        z - the third input argument