@FunctionalInterface public interface NoArgAction
Used instead of Runnable
to allow the throwing of checked exceptions.
Modifier and Type | Method and Description |
---|---|
void |
execute()
Execute the action.
|
static NoArgAction |
throwException(Throwable throwable)
Returns an action that immediately throws the given exception.
|
default Runnable |
toRunnable()
Converts this action to a runnable.
|
static NoArgAction throwException(Throwable throwable)
The exception is thrown via Exceptions.toException(Throwable)
throwable
- the throwable to immediately throw when the returned action is executed