Top Description Methods
io.smallrye.common.function

public Interface ExceptionFunction<T, R, E extends Exception>

Known Direct Subinterfaces
io.smallrye.common.function.ExceptionUnaryOperator
Known Direct Implementers
io.smallrye.common.function.Functions.ExceptionSupplierFunction, io.smallrye.common.function.Functions.SupplierExceptionFunction
Annotations
@FunctionalInterface
Type Parameters
<T>
the argument type
<R>
the result type
<E>
the exception type
Imports
io.smallrye.common.constraint.Assert

A one-argument function which can throw an exception.

Method Summary

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

Returns:

a function which applies the result of this function to the given function
andThen
(ExceptionFunction<? super R, ? extends R2, ? extends E>
the next function (must not be null)
after
)

Returns a function which applies the result of this function to the given function.

public default <
the final result type
R2
>
ExceptionFunction<T, R2, E>

Returns:

a function which applies the argument to, and result of, this function to the given function
andThen
(ExceptionBiFunction<? super T, ? super R, ? extends R2, ? extends E>
the next function (must not be null)
after
)

Returns a function which applies the argument to, and result of, this function to the given function.

public default ExceptionConsumer<T, E>

Returns:

a consumer which passes the result of this function to the given consumer
andThen
(ExceptionConsumer<? super R, ? extends E>
the consumer (must not be null)
after
)

Returns a consumer which passes the result of this function to the given consumer.

public default ExceptionConsumer<T, E>

Returns:

a consumer which passes the argument to, and result of, this function to the given consumer
andThen
(ExceptionBiConsumer<? super T, ? super R, ? extends E>
the consumer (must not be null)
after
)

Returns a consumer which passes the argument to, and result of, this function to the given consumer.

public default ExceptionPredicate<T, E>

Returns:

a predicate that is true when the given predicate is true for arguments passed through this function
andThen
(ExceptionPredicate<? super R, ? extends E>
the predicate (must not be null)
after
)

Returns a predicate that is true when the given predicate is true for arguments passed through this function.

public default ExceptionPredicate<T, E>

Returns:

a predicate that is true when the given predicate is true for arguments passed through this function
andThen
(ExceptionBiPredicate<? super T, ? super R, ? extends E>
the predicate (must not be null)
after
)

Returns a predicate that is true when the given predicate is true for arguments passed through this function.

public R

Returns:

the function result
apply
(T
the argument
t
)

Applies this function to the given arguments.

public default <
the intermediate argument type
T2
>
ExceptionFunction<T2, R, E>

Returns:

a function which applies the result of the given function to this function
compose
(ExceptionFunction<? super T2, ? extends T, ? extends E>
the first function (must not be null)
before
)

Returns a function which applies the result of the given function to this function.

public default ExceptionSupplier<R, E>

Returns:

a supplier which returns the result of this function when applied to the given supplier
compose
(ExceptionSupplier<? extends T, ? extends E>
the supplier (must not be null)
before
)

Returns a supplier which returns the result of this function when applied to the given supplier.

Method Detail

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

Returns a function which applies the result of this function to the given function.

Parameters
<R2>
the final result type
after:ExceptionFunction<? super R, ? extends R2, ? extends E>

the next function (must not be null)

Returns:ExceptionFunction<T, R2, E>

a function which applies the result of this function to the given function

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

Returns a function which applies the argument to, and result of, this function to the given function.

Parameters
<R2>
the final result type
after:ExceptionBiFunction<? super T, ? super R, ? extends R2, ? extends E>

the next function (must not be null)

Returns:ExceptionFunction<T, R2, E>

a function which applies the argument to, and result of, this function to the given function

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

Returns a consumer which passes the result of this function to the given consumer.

Parameters
after:ExceptionConsumer<? super R, ? extends E>

the consumer (must not be null)

Returns:ExceptionConsumer<T, E>

a consumer which passes the result of this function to the given consumer

andThenback to summary
public default ExceptionConsumer<T, E> andThen(ExceptionBiConsumer<? super T, ? super R, ? extends E> after)

Returns a consumer which passes the argument to, and result of, this function to the given consumer.

Parameters
after:ExceptionBiConsumer<? super T, ? super R, ? extends E>

the consumer (must not be null)

Returns:ExceptionConsumer<T, E>

a consumer which passes the argument to, and result of, this function to the given consumer

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

Returns a predicate that is true when the given predicate is true for arguments passed through this function.

Parameters
after:ExceptionPredicate<? super R, ? extends E>

the predicate (must not be null)

Returns:ExceptionPredicate<T, E>

a predicate that is true when the given predicate is true for arguments passed through this function

andThenback to summary
public default ExceptionPredicate<T, E> andThen(ExceptionBiPredicate<? super T, ? super R, ? extends E> after)

Returns a predicate that is true when the given predicate is true for arguments passed through this function.

Parameters
after:ExceptionBiPredicate<? super T, ? super R, ? extends E>

the predicate (must not be null)

Returns:ExceptionPredicate<T, E>

a predicate that is true when the given predicate is true for arguments passed through this function

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

Applies this function to the given arguments.

Parameters
t:T

the argument

Returns:R

the function result

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

Returns a function which applies the result of the given function to this function.

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

the first function (must not be null)

Returns:ExceptionFunction<T2, R, E>

a function which applies the result of the given function to this function

composeback to summary
public default ExceptionSupplier<R, E> compose(ExceptionSupplier<? extends T, ? extends E> before)

Returns a supplier which returns the result of this function when applied to the given supplier.

Parameters
before:ExceptionSupplier<? extends T, ? extends E>

the supplier (must not be null)

Returns:ExceptionSupplier<R, E>

a supplier which returns the result of this function when applied to the given supplier