Package | Description |
---|---|
org.apache.commons.lang3 |
Provides highly reusable static utility methods, chiefly concerned with adding value to the
java.lang classes. |
Modifier and Type | Method and Description |
---|---|
static <O,T extends Throwable> |
Functions.accept(Functions.FailableConsumer<O,T> consumer,
O object)
Consumes a consumer and rethrows any exception as a
RuntimeException . |
static <I> Consumer<I> |
Functions.asConsumer(Functions.FailableConsumer<I,?> consumer)
Converts the given
Functions.FailableConsumer into a standard Consumer . |
void |
Streams.FailableStream.forEach(Functions.FailableConsumer<O,?> action)
Performs an action for each element of this stream.
|
static void |
Functions.tryWithResources(Functions.FailableRunnable<? extends Throwable> action,
Functions.FailableConsumer<Throwable,? extends Throwable> errorHandler,
Functions.FailableRunnable<? extends Throwable>... resources)
A simple try-with-resources implementation, that can be used, if your
objects do not implement the
AutoCloseable interface. |
Copyright © 2001–2020 The Apache Software Foundation. All rights reserved.