Top Description Methods
io.smallrye.common.function

public Interface ExceptionToIntFunction<T, E extends Exception>

Annotations
@FunctionalInterface
Type Parameters
<T>
the object argument type
<E>
the exception type
Imports
io.smallrye.common.constraint.Assert

A two-argument function which can throw an exception.

Method Summary

Modifier and TypeMethod and Description
public default <
the result type
R
>
ExceptionFunction<T, R, E>

Returns:

the result of the second function
andThen
(ExceptionIntFunction<? extends R, ? extends E>
the function to apply (must not be null)
after
)

Apply the given function after this function.

public default <
the result type
R
>
ExceptionFunction<T, R, E>

Returns:

the result of the second function
andThen
(ExceptionLongFunction<? extends R, ? extends E>
the function to apply (must not be null)
after
)

Apply the given function after this function.

public int

Returns:

the function result
apply
(T
the first argument
t
)

Apply this function to the given arguments.

public default <
the result type
T2
>
ExceptionToIntFunction<T2, E>

Returns:

the result of the composed function
compose
(ExceptionFunction<? super T2, ? extends T, ? extends E>
the function to apply first (must not be null)
before
)

Apply this function after the given function.

Method Detail

andThenback to summary
public default <R> ExceptionFunction<T, R, E> andThen(ExceptionIntFunction<? extends R, ? extends E> after)

Apply the given function after this function.

Parameters
<R>
the result type
after:ExceptionIntFunction<? extends R, ? extends E>

the function to apply (must not be null)

Returns:ExceptionFunction<T, R, E>

the result of the second function

andThenback to summary
public default <R> ExceptionFunction<T, R, E> andThen(ExceptionLongFunction<? extends R, ? extends E> after)

Apply the given function after this function.

Parameters
<R>
the result type
after:ExceptionLongFunction<? extends R, ? extends E>

the function to apply (must not be null)

Returns:ExceptionFunction<T, R, E>

the result of the second function

applyback to summary
public int apply(T t) throws ExceptionPredicate:E

Apply this function to the given arguments.

Parameters
t:T

the first argument

Returns:int

the function result

Exceptions
ExceptionPredicate:E:
if an exception occurs
composeback to summary
public default <T2> ExceptionToIntFunction<T2, E> compose(ExceptionFunction<? super T2, ? extends T, ? extends E> before)

Apply this function after the given function.

Parameters
<T2>
the result type
before:ExceptionFunction<? super T2, ? extends T, ? extends E>

the function to apply first (must not be null)

Returns:ExceptionToIntFunction<T2, E>

the result of the composed function