Module io.smallrye.common.function
Package io.smallrye.common.function
Interface ExceptionIntFunction<R,E extends Exception>
- Type Parameters:
R- the result 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 one-argument integer function which can throw an exception.
-
Method Summary
Modifier and TypeMethodDescriptiondefault <R2> ExceptionIntFunction<R2, E> andThen(ExceptionFunction<? super R, ? extends R2, ? extends E> after) Returns a function which applies the result of this function to another function.apply(int value) Applies this function to the given arguments.default <T> ExceptionFunction<T, R, E> compose(ExceptionToIntFunction<? super T, ? extends E> before) Returns a function which applies the result of another function to this function.
-
Method Details
-
apply
Applies this function to the given arguments.- Parameters:
value- the argument- Returns:
- the function result
- Throws:
E- if an exception occurs
-
andThen
default <R2> ExceptionIntFunction<R2,E> andThen(ExceptionFunction<? super R, ? extends R2, ? extends E> after) Returns a function which applies the result of this function to another function.- Type Parameters:
R2- the result type- Parameters:
after- the other function (must not benull)- Returns:
- a function which applies the result of this function to another function
-
compose
Returns a function which applies the result of another function to this function.- Type Parameters:
T- the initial argument type- Parameters:
before- the other function (must not benull)- Returns:
- a function which applies the result of another function to this function
-