Package com.hazelcast.function
Interface ConsumerEx<T>
- Type Parameters:
T
- the type of the input to the operation
- All Superinterfaces:
Consumer<T>
,Serializable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ConsumerEx<T> extends Consumer<T>, Serializable
Serializable
variant of java.util.function.Consumer
which declares checked exception.- Since:
- 4.0
-
Method Summary
Modifier and Type Method Description default void
accept(T t)
void
acceptEx(T t)
Exception-declaring version ofConsumer.accept(T)
default ConsumerEx<T>
andThen(ConsumerEx<? super T> after)
Serializable
variant ofjava.util.function.Consumer#andThen(Consumer)
.static <T> ConsumerEx<T>
noop()
Returns a consumer that does nothing.
-
Method Details
-
acceptEx
Exception-declaring version ofConsumer.accept(T)
- Throws:
Exception
- in case of any exceptional case
-
accept
-
andThen
Serializable
variant ofjava.util.function.Consumer#andThen(Consumer)
. -
noop
Returns a consumer that does nothing.- Type Parameters:
T
- the consumer input type
-