Module io.smallrye.common.function
Package io.smallrye.common.function
Interface ExceptionToIntFunction<T,E extends Exception>
- Type Parameters:
T- the object argument typeE- the exception type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A two-argument function which can throw an exception.
-
Method Summary
Modifier and TypeMethodDescriptiondefault <R> ExceptionFunction<T, R, E> andThen(ExceptionIntFunction<? extends R, ? extends E> after) Apply the given function after this function.default <R> ExceptionFunction<T, R, E> andThen(ExceptionLongFunction<? extends R, ? extends E> after) Apply the given function after this function.intApply this function to the given arguments.default <T2> ExceptionToIntFunction<T2, E> compose(ExceptionFunction<? super T2, ? extends T, ? extends E> before) Apply this function after the given function.
-
Method Details
-
apply
Apply this function to the given arguments.- Parameters:
t- the first argument- Returns:
- the function result
- Throws:
E- if an exception occurs
-
andThen
Apply the given function after this function.- Type Parameters:
R- the result type- Parameters:
after- the function to apply (must not benull)- Returns:
- the result of the second function
-
andThen
Apply the given function after this function.- Type Parameters:
R- the result type- Parameters:
after- the function to apply (must not benull)- Returns:
- the result of the second function
-
compose
default <T2> ExceptionToIntFunction<T2,E> compose(ExceptionFunction<? super T2, ? extends T, ? extends E> before) Apply this function after the given function.- Type Parameters:
T2- the result type- Parameters:
before- the function to apply first (must not benull)- Returns:
- the result of the composed function
-