Uses of Interface
org.apache.commons.lang3.function.FailableRunnable
Package
Description
Provides functional interfaces to complement those in
java.lang.function
and utilities for working with Java
8 lambdas.Provides classes and methods to work with dates and durations.
-
Uses of FailableRunnable in org.apache.commons.lang3.function
Modifier and TypeMethodDescriptionstatic Runnable
Failable.asRunnable
(FailableRunnable<?> runnable) Converts the givenFailableRunnable
into a standardRunnable
.static <E extends Throwable>
voidFailable.run
(FailableRunnable<E> runnable) Runs a runnable and rethrows any exception as aRuntimeException
.static void
Failable.tryWithResources
(FailableRunnable<? extends Throwable> action, FailableConsumer<Throwable, ? extends Throwable> errorHandler, FailableRunnable<? extends Throwable>... resources) A simple try-with-resources implementation, that can be used, if your objects do not implement theAutoCloseable
interface.static void
Failable.tryWithResources
(FailableRunnable<? extends Throwable> action, FailableRunnable<? extends Throwable>... resources) A simple try-with-resources implementation, that can be used, if your objects do not implement theAutoCloseable
interface. -
Uses of FailableRunnable in org.apache.commons.lang3.time
Modifier and TypeMethodDescriptionDurationUtils.of
(FailableRunnable<E> runnable) Runs the lambda and returns the duration of its execution.