Package org.nuxeo.common.function
Interface ThrowableRunnable<E extends Throwable>
- Type Parameters:
E
- the type of exception to throw
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
- Since:
- 11.1
-
Method Summary
Modifier and TypeMethodDescriptionasRunnable
(ThrowableRunnable<E> throwableRunnable) static <E extends Throwable>
ThrowableSupplier<Void,E> asThrowableSupplier
(ThrowableRunnable<E> throwableRunnable) void
run()
default Runnable
default ThrowableSupplier<Void,
E>
-
Method Details
-
run
-
toRunnable
- Returns:
- this
ThrowableRunnable
as aRunnable
throwing the checked exception as an unchecked one
-
toThrowableSupplier
- Returns:
- this
ThrowableRunnable
as aThrowableSupplier
returningVoid
-
asRunnable
- Returns:
- the given
ThrowableRunnable
as aRunnable
throwing the checked exception as an unchecked one
-
asThrowableSupplier
static <E extends Throwable> ThrowableSupplier<Void,E> asThrowableSupplier(ThrowableRunnable<E> throwableRunnable) - Returns:
- the given
ThrowableRunnable
as aThrowableSupplier
returningVoid
-