Module io.smallrye.common.function
Package io.smallrye.common.function
Interface ExceptionBiFunction<T,U,R,E extends Exception>
- Type Parameters:
T- the first argument typeU- the second argument typeR- the result typeE- 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.
A two-argument function which can throw an exception.
-
Method Summary
Modifier and TypeMethodDescriptiondefault 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.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.Applies this function to the given arguments.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.
-
Method Details
-
apply
Applies this function to the given arguments.- Parameters:
t- the first argumentu- the second argument- Returns:
- the function result
- Throws:
E- if an exception occurs
-
andThen
default <R2> ExceptionBiFunction<T,U, andThenR2, E> (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 benull)- Returns:
- a function which passes the result of this function through the given function
-
andThen
Returns a consumer which passes the value given to the given consumer through this function.- Parameters:
after- the consumer (must not benull)- 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 benull)before2- the supplier for the second argument (must not benull)- Returns:
- a supplier which passes the results of the given suppliers through this function
-