Package | Description |
---|---|
org.apache.commons.lang3.function |
Provides functional interfaces to complement those in
java.lang.function and utilities for working with Java
8 lambdas. |
Modifier and Type | Method and Description |
---|---|
static java.lang.Runnable |
Failable.asRunnable(FailableRunnable<?> runnable)
Converts the given
FailableRunnable into a standard Runnable . |
static <E extends java.lang.Throwable> |
Failable.run(FailableRunnable<E> runnable)
Runs a runnable and rethrows any exception as a
RuntimeException . |
static void |
Failable.tryWithResources(FailableRunnable<? extends java.lang.Throwable> action,
FailableConsumer<java.lang.Throwable,? extends java.lang.Throwable> errorHandler,
FailableRunnable<? extends java.lang.Throwable>... resources)
A simple try-with-resources implementation, that can be used, if your objects do not implement the
AutoCloseable interface. |
static void |
Failable.tryWithResources(FailableRunnable<? extends java.lang.Throwable> action,
FailableConsumer<java.lang.Throwable,? extends java.lang.Throwable> errorHandler,
FailableRunnable<? extends java.lang.Throwable>... resources)
A simple try-with-resources implementation, that can be used, if your objects do not implement the
AutoCloseable interface. |
static void |
Failable.tryWithResources(FailableRunnable<? extends java.lang.Throwable> action,
FailableRunnable<? extends java.lang.Throwable>... resources)
A simple try-with-resources implementation, that can be used, if your objects do not implement the
AutoCloseable interface. |
static void |
Failable.tryWithResources(FailableRunnable<? extends java.lang.Throwable> action,
FailableRunnable<? extends java.lang.Throwable>... resources)
A simple try-with-resources implementation, that can be used, if your objects do not implement the
AutoCloseable interface. |