Interface ExceptionBiFunction<T,U,R,E extends Exception>

Type Parameters:
T - the first argument type
U - the second argument type
R - the result type
E - the exception type
All Known Subinterfaces:
ExceptionBinaryOperator<T,E>
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 ExceptionBiFunction<T,U,R,E extends Exception>
A two-argument function which can throw an exception.
  • Method Details

    • apply

      R apply(T t, U u) throws E
      Applies this function to the given arguments.
      Parameters:
      t - the first argument
      u - the second argument
      Returns:
      the function result
      Throws:
      E - if an exception occurs
    • andThen

      default <R2> ExceptionBiFunction<T,U,R2,E> andThen(ExceptionFunction<? super R,? extends R2,? extends E> after)
      Returns a function which passes the result of this function through the given function.
      Type Parameters:
      R2 - the intermediate result type
      Parameters:
      after - the next function (must not be null)
      Returns:
      a function which passes the result of this function through the given function
    • andThen

      default ExceptionBiConsumer<T,U,E> andThen(ExceptionConsumer<R,? extends E> after)
      Returns a consumer which passes the value given to the given consumer through this function.
      Parameters:
      after - the consumer (must not be null)
      Returns:
      a consumer which passes the value given to the given consumer through this function
    • compose

      default ExceptionSupplier<R,E> compose(ExceptionSupplier<? extends T,? extends E> before1, ExceptionSupplier<? extends U,? extends E> before2)
      Returns a supplier which passes the results of the given suppliers through this function.
      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 supplier which passes the results of the given suppliers through this function