C - Type of content in the event.@FunctionalInterface public interface EventFilter<C>
Filter implementations can be based on event class, content class, topic, channel, or anything you like.
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(Event<C> event)
States whether the event should be passed to the event handler that was registered with it.
|
default EventFilter<C> |
and(EventFilter<C> other)
Composes a new event filter by combining this event filter and the specified event filter with an AND operation.
|
default EventFilter<C> |
not()
Creates a new event filter negating this event filter.
|
default EventFilter<C> |
or(EventFilter<C> other)
Composes a new event filter by combining this event filter and the specified event filter with an OR operation.
|
boolean accept(Event<C> event)
event - Event to be filtered in or out.default EventFilter<C> and(EventFilter<C> other)
other - Other event filter to be combined.default EventFilter<C> or(EventFilter<C> other)
other - Other event filter to be combined.default EventFilter<C> not()
Copyright © 2017. All rights reserved.