public final class EventBlackList extends java.lang.Object implements EventFilter
EventFilter
which allows any events except for the events of given types.EventWhiteList
Modifier and Type | Method and Description |
---|---|
static EventBlackList |
discardEvents(java.lang.Class<? extends io.spine.base.EventMessage>... eventClasses)
Creates a new instance of
EventBlackList discarding events of the given types. |
java.util.Optional<? extends io.spine.base.EventMessage> |
filter(io.spine.base.EventMessage event)
Applies this filter to the given event.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
allowAll, filter
@SafeVarargs public static EventBlackList discardEvents(java.lang.Class<? extends io.spine.base.EventMessage>... eventClasses)
EventBlackList
discarding events of the given types.eventClasses
- the list of event classes which cannot be usedpublic java.util.Optional<? extends io.spine.base.EventMessage> filter(io.spine.base.EventMessage event)
EventFilter
filter
in interface EventFilter
event
- the event to apply the filter toOptional.empty()
if the event should not be posted