Top Description Methods
io.smallrye.common.function

public Interface ExceptionConsumer<T, E extends Exception>

Known Direct Implementers
io.smallrye.common.function.Functions.ExceptionRunnableConsumer, io.smallrye.common.function.Functions.RunnableExceptionConsumer, io.smallrye.common.function.Functions.DiscardingConsumer
Annotations
@FunctionalInterface
Type Parameters
<T>
the argument type
<E>
the exception type
Imports
io.smallrye.common.constraint.Assert

A one-argument consumer which can throw an exception.

Method Summary

Modifier and TypeMethod and Description
public void
accept(T
the argument
t
)

Performs this operation on the given argument.

public default ExceptionConsumer<T, E>

Returns:

a consumer which passes the argument to this consumer followed by the given consumer
andThen
(ExceptionConsumer<? super T, ? extends E>
the next consumer (must not be null)
after
)

Returns a consumer which passes the argument to this consumer followed by the given consumer.

public default ExceptionConsumer<T, E>

Returns:

a consumer which passes the argument to the given consumer followed by this consumer
compose
(ExceptionConsumer<? super T, ? extends E>
the first consumer (must not be null)
before
)

Returns a consumer which passes the argument to the given consumer followed by this consumer.

public default ExceptionRunnable<E>

Returns:

a runnable which passes the result of the given supplier to this consumer
compose
(ExceptionSupplier<? extends T, ? extends E>
the suppler (must not be null)
before
)

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

Method Detail

acceptback to summary
public void accept(T t) throws ExceptionPredicate:E

Performs this operation on the given argument.

Parameters
t:T

the argument

Exceptions
ExceptionPredicate:E:
if an exception occurs
andThenback to summary
public default ExceptionConsumer<T, E> andThen(ExceptionConsumer<? super T, ? extends E> after)

Returns a consumer which passes the argument to this consumer followed by the given consumer.

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

the next consumer (must not be null)

Returns:ExceptionConsumer<T, E>

a consumer which passes the argument to this consumer followed by the given consumer

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

Returns a consumer which passes the argument to the given consumer followed by this consumer.

Parameters
before:ExceptionConsumer<? super T, ? extends E>

the first consumer (must not be null)

Returns:ExceptionConsumer<T, E>

a consumer which passes the argument to the given consumer followed by this consumer

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

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

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

the suppler (must not be null)

Returns:ExceptionRunnable<E>

a runnable which passes the result of the given supplier to this consumer