E - type of checked exception possibly thrown by the implementation. You can use e.g. RuntimeException if
particular implementation does not throw any checked exceptions.public interface CheckedFunction<T,R,E extends Exception>
Function that allows checked exceptions.
Unless you need to expose checked exceptions in your API, you should use the original interface. However, when
you're unlucky enough and you have to deal with IOException, SQLException or any other checked exception, this class might come useful.
| Modifier and Type | Method and Description |
|---|---|
R |
apply(T arg) |
default <M> CheckedFunction<M,R,E> |
combine(CheckedFunction<M,T,? extends E> before)
Returns a composed function that first applies
before and then this. |
default <M> CheckedFunction<T,M,E> |
thenApply(CheckedFunction<R,M,? extends E> after)
Returns a composed function that first applies
this and then after. |
default <M> CheckedFunction<M,R,E> combine(CheckedFunction<M,T,? extends E> before)
before and then this.default <M> CheckedFunction<T,M,E> thenApply(CheckedFunction<R,M,? extends E> after)
this and then after.Copyright © 2016. All rights reserved.