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.
@FunctionalInterface public interface ThrowableRunnable<E extends Throwable>
- Since:
- 11.1
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static <E extends Throwable>
RunnableasRunnable(ThrowableRunnable<E> throwableRunnable)static <E extends Throwable>
ThrowableSupplier<Void,E>asThrowableSupplier(ThrowableRunnable<E> throwableRunnable)voidrun()default RunnabletoRunnable()default ThrowableSupplier<Void,E>toThrowableSupplier()
-
-
-
Method Detail
-
toRunnable
default Runnable toRunnable()
- Returns:
- this
ThrowableRunnableas aRunnablethrowing the checked exception as an unchecked one
-
toThrowableSupplier
default ThrowableSupplier<Void,E> toThrowableSupplier()
- Returns:
- this
ThrowableRunnableas aThrowableSupplierreturningVoid
-
asRunnable
static <E extends Throwable> Runnable asRunnable(ThrowableRunnable<E> throwableRunnable)
- Returns:
- the given
ThrowableRunnableas aRunnablethrowing the checked exception as an unchecked one
-
asThrowableSupplier
static <E extends Throwable> ThrowableSupplier<Void,E> asThrowableSupplier(ThrowableRunnable<E> throwableRunnable)
- Returns:
- the given
ThrowableRunnableas aThrowableSupplierreturningVoid
-
-