Uses of Interface
org.apache.commons.lang3.function.FailableRunnable
-
Packages that use FailableRunnable Package Description org.apache.commons.lang3.function Provides functional interfaces to complement those injava.lang.function
and utilities for working with Java 8 lambdas.org.apache.commons.lang3.time Provides classes and methods to work with dates and durations. -
-
Uses of FailableRunnable in org.apache.commons.lang3.function
Methods in org.apache.commons.lang3.function with parameters of type FailableRunnable Modifier and Type Method Description static java.lang.Runnable
Failable. asRunnable(FailableRunnable<?> runnable)
Converts the givenFailableRunnable
into a standardRunnable
.static <E extends java.lang.Throwable>
voidFailable. run(FailableRunnable<E> runnable)
Runs a runnable and rethrows any exception as aRuntimeException
.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 theAutoCloseable
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 theAutoCloseable
interface. -
Uses of FailableRunnable in org.apache.commons.lang3.time
Methods in org.apache.commons.lang3.time with parameters of type FailableRunnable Modifier and Type Method Description static <E extends java.lang.Throwable>
java.time.DurationDurationUtils. of(FailableRunnable<E> runnable)
Runs the lambda and returns the duration of its execution.<E extends java.lang.Throwable>
voidStopWatch. runT(FailableRunnable<E> runnable)
Delegates torun()
while recording the duration of the call.
-