Interface ExceptionBiConsumer<T,U,E extends Exception>

Type Parameters:
T - the first argument type
U - the second argument type
E - the exception type
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 ExceptionBiConsumer<T,U,E extends Exception>
A two-argument consumer which can throw an exception.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(T t, U u)
    Performs this operation on the given arguments.
    andThen(ExceptionBiConsumer<? super T,? super U,? extends E> after)
    Returns a consumer which passes the arguments to this consumer followed by the given consumer.
    compose(ExceptionSupplier<? extends T,? extends E> before1, ExceptionSupplier<? extends U,? extends E> before2)
    Returns a runnable which passes the results of the given suppliers through this consumer.
  • Method Details

    • accept

      void accept(T t, U u) throws E
      Performs this operation on the given arguments.
      Parameters:
      t - the first argument
      u - the second argument
      Throws:
      E - if an exception occurs
    • andThen

      default ExceptionBiConsumer<T,U,E> andThen(ExceptionBiConsumer<? super T,? super U,? extends E> after)
      Returns a consumer which passes the arguments to this consumer followed by the given consumer.
      Parameters:
      after - the next consumer (must not be null)
      Returns:
      a consumer which passes the arguments to this consumer followed by the given consumer
    • compose

      default ExceptionRunnable<E> compose(ExceptionSupplier<? extends T,? extends E> before1, ExceptionSupplier<? extends U,? extends E> before2)
      Returns a runnable which passes the results of the given suppliers through this consumer.
      Parameters:
      before1 - the supplier for the first argument (must not be null)
      before2 - the supplier for the second argument (must not be null)
      Returns:
      a runnable which passes the results of the given suppliers through this consumer