@API(status=INTERNAL,
since="1.0")
public class ExclusionReasonConsumingFilter<T>
extends Object
implements Filter<T>
Filter that passes the object and the
reason to a BiConsumer in case it is excluded.| Constructor and Description |
|---|
ExclusionReasonConsumingFilter(Filter<T> filter,
BiConsumer<T,Optional<String>> reasonConsumer)
Create a new
ExclusionReasonConsumingFilter using the supplied
filter and reasonConsumer. |
| Modifier and Type | Method and Description |
|---|---|
FilterResult |
apply(T object)
Apply this filter to the supplied object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadaptFilter, composeFilters, composeFilters, toPredicatepublic ExclusionReasonConsumingFilter(Filter<T> filter, BiConsumer<T,Optional<String>> reasonConsumer)
ExclusionReasonConsumingFilter using the supplied
filter and reasonConsumer.filter - the filter to decorate; must not be nullreasonConsumer - the consumer to call in case of exclusions; must not be nullCopyright © 2018. All rights reserved.