Interface TriConsumer<T,​U,​V>

Type Parameters:
T - The first parameter.
U - The second parameter.
V - The third parameter.
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>
This class is a consumer that takes three arugments.
  • Method Summary

    Modifier and Type Method Description
    void accept​(T t, U u, V v)
    Performs this operation on the given arguments.
    default TriConsumer<T,​U,​V> andThen​(TriConsumer<? super T,​? super U,​? super V> after)
    Returns a composed TriConsumer that performs, in sequence, this operation followed by the after operation.
    default TriConsumer<T,​U,​V> andThenL​(Consumer<? super T> after)
    Returns a composed TriConsumer that performs, in sequence, this operation followed by the after operation.
    default TriConsumer<T,​U,​V> andThenLM​(BiConsumer<? super T,​? super U> after)
    Returns a composed TriConsumer that performs, in sequence, this operation followed by the after operation.
    default TriConsumer<T,​U,​V> andThenLR​(BiConsumer<? super T,​? super V> after)
    Returns a composed TriConsumer that performs, in sequence, this operation followed by the after operation.
    default TriConsumer<T,​U,​V> andThenM​(Consumer<? super U> after)
    Returns a composed TriConsumer that performs, in sequence, this operation followed by the after operation.
    default TriConsumer<T,​U,​V> andThenMR​(BiConsumer<? super U,​? super V> after)
    Returns a composed TriConsumer that performs, in sequence, this operation followed by the after operation.
    default TriConsumer<T,​U,​V> andThenR​(Consumer<? super V> after)
    Returns a composed TriConsumer that performs, in sequence, this operation followed by the after operation.
    default Runnable applyPartial​(T t, U u, V v)
    Performs a partial application, resulting in a function that calls this with its argument and the argument given here.
    default BiConsumer<V,​U> applyPartialL​(T t)
    Performs a partial application, resulting in a function that calls this with its argument and the argument given here.
    default Consumer<V> applyPartialLM​(T t, U u)
    Performs a partial application, resulting in a function that calls this with its argument and the argument given here.
    default Consumer<U> applyPartialLR​(T t, V v)
    Performs a partial application, resulting in a function that calls this with its argument and the argument given here.
    default BiConsumer<T,​V> applyPartialM​(U u)
    Performs a partial application, resulting in a function that calls this with its argument and the argument given here.
    default Consumer<T> applyPartialMR​(U u, V v)
    Performs a partial application, resulting in a function that calls this with its argument and the argument given here.
    default BiConsumer<T,​U> applyPartialR​(V v)
    Performs a partial application, resulting in a function that calls this with its argument and the argument given here.
  • Method Details

    • accept

      void accept​(T t, U u, V v)
      Performs this operation on the given arguments.
      Parameters:
      t - the first input argument
      u - the second input argument
      v - the third input argument
    • andThen

      default TriConsumer<T,​U,​V> andThen​(TriConsumer<? super T,​? super U,​? super V> 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
    • andThenLM

      default TriConsumer<T,​U,​V> andThenLM​(BiConsumer<? super T,​? super U> 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
    • andThenLR

      default TriConsumer<T,​U,​V> andThenLR​(BiConsumer<? super T,​? super V> 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
    • andThenMR

      default TriConsumer<T,​U,​V> andThenMR​(BiConsumer<? super U,​? super V> 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
    • andThenL

      default TriConsumer<T,​U,​V> andThenL​(Consumer<? super T> 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
    • andThenM

      default TriConsumer<T,​U,​V> andThenM​(Consumer<? super U> 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
    • andThenR

      default TriConsumer<T,​U,​V> andThenR​(Consumer<? super V> 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
    • applyPartial

      default Runnable applyPartial​(T t, U u, V v)
      Performs a partial application, resulting in a function that calls this with its argument and the argument given here.
      Parameters:
      t - the first function argument
      u - the second function argument
      v - the third function argument
      Returns:
      the function result
    • applyPartialLM

      default Consumer<V> applyPartialLM​(T t, U u)
      Performs a partial application, resulting in a function that calls this with its argument and the argument given here.
      Parameters:
      t - the first function argument
      u - the second function argument
      Returns:
      the function result
    • applyPartialLR

      default Consumer<U> applyPartialLR​(T t, V v)
      Performs a partial application, resulting in a function that calls this with its argument and the argument given here.
      Parameters:
      t - the first function argument
      v - the third function argument
      Returns:
      the function result
    • applyPartialMR

      default Consumer<T> applyPartialMR​(U u, V v)
      Performs a partial application, resulting in a function that calls this with its argument and the argument given here.
      Parameters:
      u - the second function argument
      v - the third function argument
      Returns:
      the function result
    • applyPartialL

      default BiConsumer<V,​U> applyPartialL​(T t)
      Performs a partial application, resulting in a function that calls this with its argument and the argument given here.
      Parameters:
      t - the first function argument
      Returns:
      the function result
    • applyPartialM

      default BiConsumer<T,​V> applyPartialM​(U u)
      Performs a partial application, resulting in a function that calls this with its argument and the argument given here.
      Parameters:
      u - the second function argument
      Returns:
      the function result
    • applyPartialR

      default BiConsumer<T,​U> applyPartialR​(V v)
      Performs a partial application, resulting in a function that calls this with its argument and the argument given here.
      Parameters:
      v - the third function argument
      Returns:
      the function result