T - Input type 1.R - Return type.E - Thrown exception.@FunctionalInterface public interface FailableFunction<T,R,E extends Throwable>
Function that declares a Throwable.| Modifier and Type | Field and Description |
|---|---|
static FailableFunction |
NOP
NOP singleton
|
| Modifier and Type | Method and Description |
|---|---|
default <V> FailableFunction<T,V,E> |
andThen(FailableFunction<? super R,? extends V,E> after)
Returns a composed
FailableFunction like Function.andThen(Function). |
R |
apply(T input)
Applies this function.
|
default <V> FailableFunction<V,R,E> |
compose(FailableFunction<? super V,? extends T,E> before)
Returns a composed
FailableFunction like Function.compose(Function). |
static <T,E extends Throwable> |
identity()
Returns a function that always returns its input argument.
|
static <T,R,E extends Throwable> |
nop()
Returns The NOP singleton.
|
static final FailableFunction NOP
static <T,E extends Throwable> FailableFunction<T,T,E> identity()
T - the type of the input and output objects to the functionE - Thrown exception.static <T,R,E extends Throwable> FailableFunction<T,R,E> nop()
T - Consumed type 1.R - Return type.E - Thrown exception.default <V> FailableFunction<T,V,E> andThen(FailableFunction<? super R,? extends V,E> after)
FailableFunction like Function.andThen(Function).V - the output type of the after function, and of the composed function.after - the operation to perform after this one.FailableFunction like Function.andThen(Function).NullPointerException - when after is null.default <V> FailableFunction<V,R,E> compose(FailableFunction<? super V,? extends T,E> before)
FailableFunction like Function.compose(Function).V - the input type to the before function, and to the composed function.before - the operator to apply before this one.FailableFunction like Function.compose(Function).NullPointerException - if before is null.andThen(FailableFunction)Copyright © 2001–2020 The Apache Software Foundation. All rights reserved.