@FunctionalInterface
public interface ThrowingFunction<O,R,T extends java.lang.Throwable>
| Modifier and Type | Method and Description |
|---|---|
default <X> ThrowingFunction<X,R,T> |
after(ThrowingFunction<? super X,? extends O,T> other)
Executes the other function before this one.
|
R |
apply(O o) |
default <X> ThrowingFunction<O,X,T> |
before(ThrowingFunction<? super R,? extends X,T> other)
Executes the other function after this one.
|
default <X,E extends java.lang.Throwable> |
identity()
A function that always returns the argument value.
|
default <X> ThrowingFunction<O,X,T> before(ThrowingFunction<? super R,? extends X,T> other)
a.before(b); //a is executed before bX - The return type of the other functionother - The other function to executedefault <X> ThrowingFunction<X,R,T> after(ThrowingFunction<? super X,? extends O,T> other)
a.after(b); //b is executed before aX - The argument type of the other functionother - The other function to executedefault <X,E extends java.lang.Throwable> ThrowingFunction<X,X,E> identity()
X - The type of the argumentE - The type of the exception