Package org.apache.dubbo.common.function
Interface ThrowableFunction<T,R>
- Type Parameters:
T- the source typeR- the return type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
- Since:
- 2.7.5
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionApplies this function to the given argument.default RExecutesThrowableFunctionstatic <T,R> R execute(T t, ThrowableFunction<T, R> function) ExecutesThrowableFunction
-
Method Details
-
apply
Applies this function to the given argument.- Parameters:
t- the function argument- Returns:
- the function result
- Throws:
Throwable- if met with any error
-
execute
ExecutesThrowableFunction- Parameters:
t- the function argument- Returns:
- the function result
- Throws:
RuntimeException- wrappersThrowable
-
execute
ExecutesThrowableFunction- Type Parameters:
T- the source typeR- the return type- Parameters:
t- the function argumentfunction-ThrowableFunction- Returns:
- the result after execution
-