T - the type of the input to the operations.R - the return type of the operations.@FunctionalInterface public interface IOFunction<T,R>
Function but throws IOException.| Modifier and Type | Method and Description |
|---|---|
default IOConsumer<T> |
andThen(Consumer<? super R> after)
Returns a composed
IOFunction that first applies this function to
its input, and then applies the after consumer to the result. |
default <V> IOFunction<T,V> |
andThen(Function<? super R,? extends V> after)
Returns a composed
IOFunction that first applies this function to
its input, and then applies the after function to the result. |
default IOConsumer<T> |
andThen(IOConsumer<? super R> after)
Returns a composed
IOFunction that first applies this function to
its input, and then applies the after consumer to the result. |
default <V> IOFunction<T,V> |
andThen(IOFunction<? super R,? extends V> after)
Returns a composed
IOFunction that first applies this function to
its input, and then applies the after function to the result. |
R |
apply(T t)
Applies this function to the given argument.
|
default <V> IOFunction<V,R> |
compose(Function<? super V,? extends T> before)
Returns a composed
IOFunction that first applies the before
function to its input, and then applies this function to the result. |
default <V> IOFunction<V,R> |
compose(IOFunction<? super V,? extends T> before)
Returns a composed
IOFunction that first applies the before
function to its input, and then applies this function to the result. |
default IOSupplier<R> |
compose(IOSupplier<? extends T> before)
Returns a composed
IOFunction that first applies the before
function to its input, and then applies this function to the result. |
default IOSupplier<R> |
compose(Supplier<? extends T> before)
Returns a composed
IOFunction that first applies the before
function to its input, and then applies this function to the result. |
static <T> IOFunction<T,T> |
identity()
Returns a
IOFunction that always returns its input argument. |
R apply(T t) throws IOException
t - the function argumentIOException - if the function throws an IOExceptiondefault <V> IOFunction<V,R> compose(IOFunction<? super V,? extends T> before)
IOFunction that first applies the before
function to its input, and then applies this function to the result.
If evaluation of either function throws an exception, it is relayed to
the caller of the composed function.V - the type of input to the before function, and to the
composed functionbefore - the function to apply before this function is appliedbefore
function and then applies this functionNullPointerException - if before is nullandThen(IOFunction)default <V> IOFunction<V,R> compose(Function<? super V,? extends T> before)
IOFunction that first applies the before
function to its input, and then applies this function to the result.
If evaluation of either function throws an exception, it is relayed to
the caller of the composed function.V - the type of input to the before function, and to the
composed functionbefore - the function to apply before this function is appliedbefore
function and then applies this functionNullPointerException - if before is nullandThen(IOFunction)default IOSupplier<R> compose(IOSupplier<? extends T> before)
IOFunction that first applies the before
function to its input, and then applies this function to the result.
If evaluation of either function throws an exception, it is relayed to
the caller of the composed function.before - the supplier which feeds the application of this functionbefore
function and then applies this functionNullPointerException - if before is nullandThen(IOFunction)default IOSupplier<R> compose(Supplier<? extends T> before)
IOFunction that first applies the before
function to its input, and then applies this function to the result.
If evaluation of either function throws an exception, it is relayed to
the caller of the composed function.before - the supplier which feeds the application of this functionbefore
function and then applies this functionNullPointerException - if before is nullandThen(IOFunction)default <V> IOFunction<T,V> andThen(IOFunction<? super R,? extends V> after)
IOFunction that first applies this function to
its input, and then applies the after function to the result.
If evaluation of either function throws an exception, it is relayed to
the caller of the composed function.V - the type of output of the after function, and of the
composed functionafter - the function to apply after this function is appliedafter functionNullPointerException - if after is nullcompose(IOFunction)default <V> IOFunction<T,V> andThen(Function<? super R,? extends V> after)
IOFunction that first applies this function to
its input, and then applies the after function to the result.
If evaluation of either function throws an exception, it is relayed to
the caller of the composed function.V - the type of output of the after function, and of the
composed functionafter - the function to apply after this function is appliedafter functionNullPointerException - if after is nullcompose(IOFunction)default IOConsumer<T> andThen(IOConsumer<? super R> after)
IOFunction that first applies this function to
its input, and then applies the after consumer to the result.
If evaluation of either function throws an exception, it is relayed to
the caller of the composed function.after - the consumer to apply after this function is appliedafter consumerNullPointerException - if after is nullcompose(IOFunction)default IOConsumer<T> andThen(Consumer<? super R> after)
IOFunction that first applies this function to
its input, and then applies the after consumer to the result.
If evaluation of either function throws an exception, it is relayed to
the caller of the composed function.after - the consumer to apply after this function is appliedafter consumerNullPointerException - if after is nullcompose(IOFunction)static <T> IOFunction<T,T> identity()
IOFunction that always returns its input argument.T - the type of the input and output objects to the functionCopyright © 2002–2020 The Apache Software Foundation. All rights reserved.