Uses of Interface
org.apache.commons.lang3.function.FailableConsumer
Package
Description
Provides support classes for multi-threaded programming.
Provides support classes for multi-threaded programming.
Provides some useful event-based utilities.
Provides functional interfaces to complement those in
java.lang.function
and utilities for working with Java
8 lambdas.Provides utility classes to complement those in
java.util.stream
.Provides classes and methods to work with dates and durations.
-
Uses of FailableConsumer in org.apache.commons.lang3.concurrent
Modifier and TypeMethodDescriptionFailableConsumer<T,
? extends Exception> AbstractConcurrentInitializer.AbstractBuilder.getCloser()
Gets the closer consumer called byAbstractConcurrentInitializer.close()
.Modifier and TypeMethodDescriptionAbstractConcurrentInitializer.AbstractBuilder.setCloser
(FailableConsumer<T, ? extends Exception> closer) Sets the closer consumer called byAbstractConcurrentInitializer.close()
. -
Uses of FailableConsumer in org.apache.commons.lang3.concurrent.locks
Modifier and TypeMethodDescriptionvoid
LockingVisitors.LockVisitor.acceptReadLocked
(FailableConsumer<O, ?> consumer) Provides read (shared, non-exclusive) access to the locked (hidden) object.void
LockingVisitors.LockVisitor.acceptWriteLocked
(FailableConsumer<O, ?> consumer) Provides write (exclusive) access to the locked (hidden) object.protected void
LockingVisitors.LockVisitor.lockAcceptUnlock
(Supplier<Lock> lockSupplier, FailableConsumer<O, ?> consumer) This method provides the default implementation forLockingVisitors.LockVisitor.acceptReadLocked(FailableConsumer)
, andLockingVisitors.LockVisitor.acceptWriteLocked(FailableConsumer)
. -
Uses of FailableConsumer in org.apache.commons.lang3.event
ModifierConstructorDescriptionConstructs a new instance. -
Uses of FailableConsumer in org.apache.commons.lang3.function
Modifier and TypeFieldDescriptionstatic final FailableConsumer
FailableConsumer.NOP
NOP singletonModifier and TypeMethodDescriptiondefault FailableConsumer<T,
E> FailableConsumer.andThen
(FailableConsumer<? super T, E> after) Returns a composedConsumer
likeConsumer.andThen(Consumer)
.static <T,
E extends Throwable>
FailableConsumer<T,E> FailableConsumer.nop()
Returns The NOP singleton.Modifier and TypeMethodDescriptionstatic <T,
E extends Throwable>
voidFailable.accept
(FailableConsumer<T, E> consumer, T object) Consumes a consumer and rethrows any exception as aRuntimeException
.default FailableConsumer<T,
E> FailableConsumer.andThen
(FailableConsumer<? super T, E> after) Returns a composedConsumer
likeConsumer.andThen(Consumer)
.static <T> Consumer<T>
Failable.asConsumer
(FailableConsumer<T, ?> consumer) Converts the givenFailableConsumer
into a standardConsumer
.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. -
Uses of FailableConsumer in org.apache.commons.lang3.stream
Modifier and TypeMethodDescriptionvoid
Streams.FailableStream.forEach
(FailableConsumer<T, ?> action) Performs an action for each element of this stream. -
Uses of FailableConsumer in org.apache.commons.lang3.time
Modifier and TypeMethodDescriptionDurationUtils.of
(FailableConsumer<Instant, E> consumer) Runs the lambda and returns the duration of its execution.