java.util.function.Consumer<T>public class ConsumerWithContext<T> extends WrapperWithContext<T> implements java.util.function.Consumer<T>
Consumer that reactivates a context snapshot before
calling a delegate.| Modifier and Type | Field | Description |
|---|---|---|
protected java.util.function.Consumer<ContextSnapshot> |
contextSnapshotConsumer |
The context snapshot consumer to provide a new snapshot to after the function is completed, may be
null. |
| Modifier | Constructor | Description |
|---|---|---|
protected |
ConsumerWithContext(java.util.function.Supplier<ContextSnapshot> supplier,
java.util.function.Consumer<T> delegate,
java.util.function.Consumer<ContextSnapshot> consumer) |
|
|
ConsumerWithContext(ContextSnapshot snapshot,
java.util.function.Consumer<T> delegate) |
|
|
ConsumerWithContext(ContextSnapshot snapshot,
java.util.function.Consumer<T> delegate,
java.util.function.Consumer<ContextSnapshot> consumer) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
accept(T t) |
|
java.util.function.Consumer<T> |
andThen(java.util.function.Consumer<? super T> after) |
|
protected java.util.Optional<java.util.function.Consumer<ContextSnapshot>> |
consumer() |
Deprecated.
The functional wrappers currently no longer use this method.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitdelegate, nonNullDelegateequals, hashCode, snapshot, toStringprotected final java.util.function.Consumer<ContextSnapshot> contextSnapshotConsumer
null.public ConsumerWithContext(ContextSnapshot snapshot, java.util.function.Consumer<T> delegate)
public ConsumerWithContext(ContextSnapshot snapshot, java.util.function.Consumer<T> delegate, java.util.function.Consumer<ContextSnapshot> consumer)
protected ConsumerWithContext(java.util.function.Supplier<ContextSnapshot> supplier, java.util.function.Consumer<T> delegate, java.util.function.Consumer<ContextSnapshot> consumer)
public java.util.function.Consumer<T> andThen(java.util.function.Consumer<? super T> after)
andThen in interface java.util.function.Consumer<T>@Deprecated protected java.util.Optional<java.util.function.Consumer<ContextSnapshot>> consumer()
Copyright © 2016–2019 Talsma ICT. All rights reserved.