Interface CheckedCallable<T,E extends Throwable>
- Type Parameters:
T
- the output type.E
- the throwable type.
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A Callable-like interface which allows throwing any Throwable.
Checked exceptions are wrapped in an IllegalStateException.
- Since:
- 6.2
- Author:
- Artem Bilan
-
Method Summary
-
Method Details
-
call
-
unchecked
Deprecated.since 6.3.7 in favor ofuncheckedCallable()
. Will be restored back, but with a properCallable
return type.Wrap thecall()
into uncheckedRunnable
(by mistake). Re-throw its exception wrapped with aIllegalStateException
.- Returns:
- the Runnable (by mistake).
-
uncheckedCallable
Wrap thecall()
into uncheckedCallable
. Re-throw its exception wrapped with aIllegalStateException
. Will be replaced with a properunchecked()
implementation in 6.5.- Returns:
- the unchecked
Callable
. - Since:
- 6.3.7
-
uncheckedCallable()
.