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(java.util.function.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(java.util.function.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 java.util.function.Function<T,R> |
asFunction()
Creates a
Function for this instance that throws UncheckedIOException instead of IOException . |
default <V> IOFunction<V,R> |
compose(java.util.function.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(java.util.function.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. |
static <T> IOFunction<T,T> identity()
IOFunction
that always returns its input argument.T
- the type of the input and output objects to the functiondefault IOConsumer<T> andThen(java.util.function.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
consumerjava.lang.NullPointerException
- if after is nullcompose(IOFunction)
default <V> IOFunction<T,V> andThen(java.util.function.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
functionjava.lang.NullPointerException
- 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
consumerjava.lang.NullPointerException
- if after is nullcompose(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
functionjava.lang.NullPointerException
- if after is nullcompose(IOFunction)
R apply(T t) throws java.io.IOException
t
- the function argumentjava.io.IOException
- if an I/O error occurs.default java.util.function.Function<T,R> asFunction()
Function
for this instance that throws UncheckedIOException
instead of IOException
.default <V> IOFunction<V,R> compose(java.util.function.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 functionjava.lang.NullPointerException
- if before is nullandThen(IOFunction)
default <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 functionjava.lang.NullPointerException
- 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 functionjava.lang.NullPointerException
- if before is nullandThen(IOFunction)
default IOSupplier<R> compose(java.util.function.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 functionjava.lang.NullPointerException
- if before is nullandThen(IOFunction)
Copyright © 2010 - 2023 Adobe. All Rights Reserved