BiFunction that allows invocation of code that throws a checked
exception.
| Modifier and Type | Method and Description |
|---|---|
| public default R | Returns: the function resultthe first function argument t, U the second function argument u)Implements java. Default |
| public default R | Returns: a resultthe first function argument t, U the second function argument u, BiFunction<String, Exception, RuntimeException> BiFunction that wraps the given message
and checked exception into a runtime exceptionApplies this function to the given argument, wrapping any thrown checked
exceptions using the given |
| public R | Returns: the function resultthe first function argument t, U the second function argument u)Applies this function to the given argument, possibly throwing a checked exception. |
| public static < the type of the first argument to the function T, the type of the second argument to the function U, the type of the result of the function R> ThrowingBiFunction | Returns: a newThrowingFunction instancethe source function function)Lambda friendly convenience method that can be used to create a
|
| public static < the type of the first argument to the function T, the type of the second argument to the function U, the type of the result of the function R> ThrowingBiFunction | Returns: a newThrowingFunction instancethe source function function, BiFunction<String, Exception, RuntimeException> the exception wrapper to use exceptionWrapper)Lambda friendly convenience method that can be used to create a
|
| public default ThrowingBiFunction | Returns: the replacementThrowingBiFunction instanceBiFunction that wraps the given message
and checked exception into a runtime exceptionReturn a new |
| apply | back to summary |
|---|---|
| public default R apply(T t, U u) Implements java. Default
| |
| apply | back to summary |
|---|---|
| public default R apply(T t, U u, BiFunction<String, Exception, RuntimeException> exceptionWrapper) Applies this function to the given argument, wrapping any thrown checked
exceptions using the given
| |
| applyWithException | back to summary |
|---|---|
| public R applyWithException(T t, U u) throws Exception Applies this function to the given argument, possibly throwing a checked exception.
| |
| of | back to summary |
|---|---|
| public static <T, U, R> ThrowingBiFunction Lambda friendly convenience method that can be used to create a
This method can be especially useful when working with method references.
It allows you to easily convert a method that throws a checked exception
into an instance compatible with a regular For example: map.replaceAll(ThrowingBiFunction.of(Example::methodThatCanThrowCheckedException));
| |
| of | back to summary |
|---|---|
| public static <T, U, R> ThrowingBiFunction Lambda friendly convenience method that can be used to create a
This method can be especially useful when working with method references.
It allows you to easily convert a method that throws a checked exception
into an instance compatible with a regular For example: map.replaceAll(ThrowingBiFunction.of(Example::methodThatCanThrowCheckedException, IllegalStateException::new));
| |
| throwing | back to summary |
|---|---|
| public default ThrowingBiFunction Return a new
| |