Interface ThrowableTriConsumer<T,U,V,X extends Throwable>

Type Parameters:
T - The first argument type
U - The second argument type
V - The third argument type
X - The exception that can be thrown
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 ThrowableTriConsumer<T,U,V,X extends Throwable>
Functional interface that takes three arguments and consumes them.
The FunctionalInterface method is accept(Object, Object, Object).
The class is equivalent to TriConsumer, but the functional method can throw a checked exception.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(T t, U u, V v)
    Functional method that takes three arguments and consumes them.
    default @NotNull ThrowableTriConsumer<T,U,V,X>
    andThen(@NotNull ThrowableTriConsumer<? super T,? super U,? super V,X> after)
    Returns a composed consumer of same type that performs,
    in sequence, this operation followed by the after operation.
    static <T, U, V> @NotNull TriConsumer<T,U,V>
    caught(@NotNull ThrowableTriConsumer<T,U,V,? extends Throwable> consumer)
    Converts a throwable tri-consumer into a tri-consumer that throws a runtime exception when an exception is thrown.
  • Method Details

    • caught

      @NotNull static <T, U, V> @NotNull TriConsumer<T,U,V> caught(@NotNull @NotNull ThrowableTriConsumer<T,U,V,? extends Throwable> consumer)
      Converts a throwable tri-consumer into a tri-consumer that throws a runtime exception when an exception is thrown.
      Type Parameters:
      T - The first argument type
      U - The second argument type
      V - The third argument type
      Parameters:
      consumer - The throwable tri-consumer
      Returns:
      A caught tri-consumer
      Throws:
      NullPointerException - If the throwable tri-consumer is null
    • accept

      void accept(T t, U u, V v) throws X
      Functional method that takes three arguments and consumes them.
      Parameters:
      t - The first argument
      u - The second argument
      v - The third argument
      Throws:
      X - The exception that can be thrown
    • andThen

      @NotNull default @NotNull ThrowableTriConsumer<T,U,V,X> andThen(@NotNull @NotNull ThrowableTriConsumer<? super T,? super U,? super V,X> after)
      Returns a composed consumer of same type that performs,
      in sequence, this operation followed by the after operation.
      Parameters:
      after - The operation to perform after this operation
      Returns:
      The composed throwable consumer
      Throws:
      NullPointerException - If the after operation is null