Uses of Interface
org.apache.commons.lang3.function.FailableFunction
Package
Description
Provides support classes for multi-threaded programming.
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
.-
Uses of FailableFunction in org.apache.commons.lang3.concurrent.locks
Modifier and TypeMethodDescription<T> T
LockingVisitors.LockVisitor.applyReadLocked
(FailableFunction<O, T, ?> function) Provides read (shared, non-exclusive) access to the locked (hidden) object for the purpose of computing a result object.<T> T
LockingVisitors.LockVisitor.applyWriteLocked
(FailableFunction<O, T, ?> function) Provides write (exclusive) access to the locked (hidden) object for the purpose of computing a result object.protected <T> T
LockingVisitors.LockVisitor.lockApplyUnlock
(Supplier<Lock> lockSupplier, FailableFunction<O, T, ?> function) This method provides the actual implementation forLockingVisitors.LockVisitor.applyReadLocked(FailableFunction)
, andLockingVisitors.LockVisitor.applyWriteLocked(FailableFunction)
. -
Uses of FailableFunction in org.apache.commons.lang3.function
Modifier and TypeFieldDescriptionstatic final FailableFunction
FailableFunction.NOP
NOP singletonModifier and TypeMethodDescriptiondefault <V> FailableFunction<T,
V, E> FailableFunction.andThen
(FailableFunction<? super R, ? extends V, E> after) Returns a composedFailableFunction
likeFunction.andThen(Function)
.static <T,
R> FailableFunction<T, R, Throwable> MethodInvokers.asFailableFunction
(Method method) Produces aFailableFunction
for a given a supplier Method.default <V> FailableFunction<V,
R, E> FailableFunction.compose
(FailableFunction<? super V, ? extends T, E> before) Returns a composedFailableFunction
likeFunction.compose(Function)
.static <T,
R, E extends Throwable>
FailableFunction<T,R, E> FailableFunction.function
(FailableFunction<T, R, E> function) Starts a fluent chain likefunction(foo::bar).andThen(...).andThen(...).apply(...);
static <T,
E extends Throwable>
FailableFunction<T,T, E> FailableFunction.identity()
Returns a function that always returns its input argument.static <T,
R, E extends Throwable>
FailableFunction<T,R, E> FailableFunction.nop()
Returns The NOP singleton.Modifier and TypeMethodDescriptiondefault <V> FailableBiFunction<T,
U, V, E> FailableBiFunction.andThen
(FailableFunction<? super R, ? extends V, E> after) Returns a composedFailableBiFunction
that likeBiFunction.andThen(Function)
.default <V> FailableFunction<T,
V, E> FailableFunction.andThen
(FailableFunction<? super R, ? extends V, E> after) Returns a composedFailableFunction
likeFunction.andThen(Function)
.static <T,
R, E extends Throwable>
RFailable.apply
(FailableFunction<T, R, E> function, T input) Applies a function and rethrows any exception as aRuntimeException
.static <T,
R> Function<T, R> Failable.asFunction
(FailableFunction<T, R, ?> function) Converts the givenFailableFunction
into a standardFunction
.default <V> FailableFunction<V,
R, E> FailableFunction.compose
(FailableFunction<? super V, ? extends T, E> before) Returns a composedFailableFunction
likeFunction.compose(Function)
.static <T,
R, E extends Throwable>
FailableFunction<T,R, E> FailableFunction.function
(FailableFunction<T, R, E> function) Starts a fluent chain likefunction(foo::bar).andThen(...).andThen(...).apply(...);
-
Uses of FailableFunction in org.apache.commons.lang3.stream
Modifier and TypeMethodDescription<R> Streams.FailableStream<R>
Streams.FailableStream.map
(FailableFunction<T, R, ?> mapper) Returns a stream consisting of the results of applying the given function to the elements of this stream.