Package no.digipost.function
Interface ThrowingFunction<T,R,X extends Throwable>
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ThrowingFunction<T,R,X extends Throwable>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <V> ThrowingFunction<T,V,X>andThen(ThrowingFunction<? super R,V,? extends X> after)Rapply(T t)default Function<T,R>asUnchecked()default <V> ThrowingFunction<V,R,X>compose(ThrowingFunction<? super V,? extends T,? extends X> before)default Function<T,Optional<R>>ifException(BiConsumer<? super T,Exception> exceptionHandler)default Function<T,Optional<R>>ifException(Consumer<Exception> exceptionHandler)default Function<T,R>ifExceptionApply(BiFunction<? super T,Exception,? extends R> exceptionMapper)default Function<T,R>ifExceptionApply(Function<Exception,? extends R> exceptionMapper)default Function<T,R>ifExceptionThrow(BiFunction<? super T,? super Exception,? extends RuntimeException> exceptionMapper)default Function<T,R>ifExceptionThrow(Function<? super Exception,? extends RuntimeException> exceptionMapper)
-
-
-
Method Detail
-
ifExceptionThrow
default Function<T,R> ifExceptionThrow(Function<? super Exception,? extends RuntimeException> exceptionMapper)
-
ifExceptionThrow
default Function<T,R> ifExceptionThrow(BiFunction<? super T,? super Exception,? extends RuntimeException> exceptionMapper)
-
ifException
default Function<T,Optional<R>> ifException(BiConsumer<? super T,Exception> exceptionHandler)
-
ifExceptionApply
default Function<T,R> ifExceptionApply(Function<Exception,? extends R> exceptionMapper)
-
ifExceptionApply
default Function<T,R> ifExceptionApply(BiFunction<? super T,Exception,? extends R> exceptionMapper)
-
andThen
default <V> ThrowingFunction<T,V,X> andThen(ThrowingFunction<? super R,V,? extends X> after)
-
compose
default <V> ThrowingFunction<V,R,X> compose(ThrowingFunction<? super V,? extends T,? extends X> before)
-
-