# Uses of Interface
org.apache.commons.lang3.function.FailableConsumer

Packages that use FailableConsumer
Package
Description
org.apache.commons.lang3.concurrent
Provides support classes for multi-threaded programming.
org.apache.commons.lang3.concurrent.locks
Provides support classes for multi-threaded programming.
org.apache.commons.lang3.function
Provides functional interfaces to complement those in `java.lang.function` and utilities for working with Java 8 lambdas.
org.apache.commons.lang3.stream
Provides utility classes to complement those in `java.util.stream`.
org.apache.commons.lang3.time
Provides classes and methods to work with dates and durations.

- ## Uses of FailableConsumer in org.apache.commons.lang3.concurrent

  Methods in org.apache.commons.lang3.concurrent that return FailableConsumer
  Modifier and Type
  Method
  Description
  `FailableConsumer<T,? extends Exception>`
  AbstractConcurrentInitializer.AbstractBuilder.`getCloser()`
  Gets the closer consumer called by `AbstractConcurrentInitializer.close()`.
  Methods in org.apache.commons.lang3.concurrent with parameters of type FailableConsumer
  Modifier and Type
  Method
  Description
  `B`
  AbstractConcurrentInitializer.AbstractBuilder.`setCloser(FailableConsumer<T,? extends Exception> closer)`
  Sets the closer consumer called by `AbstractConcurrentInitializer.close()`.

- ## Uses of FailableConsumer in org.apache.commons.lang3.concurrent.locks

  Methods in org.apache.commons.lang3.concurrent.locks with parameters of type FailableConsumer
  Modifier and Type
  Method
  Description
  `void`
  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 for `LockingVisitors.LockVisitor.acceptReadLocked(FailableConsumer)`, and `LockingVisitors.LockVisitor.acceptWriteLocked(FailableConsumer)`.

- ## Uses of FailableConsumer in org.apache.commons.lang3.function

  Fields in org.apache.commons.lang3.function declared as FailableConsumer
  Modifier and Type
  Field
  Description
  `static final FailableConsumer`
  FailableConsumer.`NOP`
  NOP singleton
  Methods in org.apache.commons.lang3.function that return FailableConsumer
  Modifier and Type
  Method
  Description
  `default FailableConsumer<T,E>`
  FailableConsumer.`andThen(FailableConsumer<? super T,E> after)`
  Returns a composed `Consumer` like `Consumer.andThen(Consumer)`.
  `static <T, E extends Throwable>
  FailableConsumer<T,E>`
  FailableConsumer.`nop()`
  Returns The NOP singleton.
  Methods in org.apache.commons.lang3.function with parameters of type FailableConsumer
  Modifier and Type
  Method
  Description
  `static <T, E extends Throwable>
  void`
  Failable.`accept(FailableConsumer<T,E> consumer, T object)`
  Consumes a consumer and rethrows any exception as a `RuntimeException`.
  `default FailableConsumer<T,E>`
  FailableConsumer.`andThen(FailableConsumer<? super T,E> after)`
  Returns a composed `Consumer` like `Consumer.andThen(Consumer)`.
  `static <T> Consumer<T>`
  Failable.`asConsumer(FailableConsumer<T,?> consumer)`
  Converts the given `FailableConsumer` into a standard `Consumer`.
  `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 the `AutoCloseable` interface.

- ## Uses of FailableConsumer in org.apache.commons.lang3.stream

  Methods in org.apache.commons.lang3.stream with parameters of type FailableConsumer
  Modifier and Type
  Method
  Description
  `void`
  Streams.FailableStream.`forEach(FailableConsumer<T,?> action)`
  Performs an action for each element of this stream.

- ## Uses of FailableConsumer in org.apache.commons.lang3.time

  Methods in org.apache.commons.lang3.time with parameters of type FailableConsumer
  Modifier and Type
  Method
  Description
  `static <E extends Throwable>
  Duration`
  DurationUtils.`of(FailableConsumer<Instant,E> consumer)`
  Runs the lambda and returns the duration of its execution.