C - Type of content in the event.public class TopicFilter<C> extends Object implements EventFilter<C>
| Constructor and Description |
|---|
TopicFilter(boolean accept,
Collection<Topic<? extends C>> topics)
Constructor.
|
TopicFilter(boolean accept,
Topic<? extends C>... topics)
Constructor.
|
TopicFilter(Collection<Topic<? extends C>> topics)
Constructor.
|
TopicFilter(Topic<? extends C>... topics)
Constructor.
|
TopicFilter(Topic<? extends C> topic)
Constructor.
|
| 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.
|
void |
addTopic(Topic<? extends C> topic)
Adds the specified topic for which the events should either be accepted or rejected.
|
void |
removeTopic(Topic<? extends C> topic)
Removes the specified topic for which the events should now be either rejected or accepted.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitand, not, orpublic TopicFilter(Topic<? extends C> topic)
topic - Topic for which the events are either accepted.@SafeVarargs public TopicFilter(Topic<? extends C>... topics)
topics - Topics for which the events are either accepted.public TopicFilter(Collection<Topic<? extends C>> topics)
topics - Topics for which the events are either accepted.@SafeVarargs public TopicFilter(boolean accept, Topic<? extends C>... topics)
accept - True if the filter should accept events for the given topics, false if it should reject events for
the given topics.topics - Topics for which the events are either accepted or rejected.public TopicFilter(boolean accept,
Collection<Topic<? extends C>> topics)
accept - True if the filter should accept events for the given topics, false if it should reject events for
the given topics.topics - Topics for which the events are either accepted or rejected.public void addTopic(Topic<? extends C> topic)
topic - Event topic to be added.public void removeTopic(Topic<? extends C> topic)
topic - Event topic to be removed.public boolean accept(Event<C> event)
EventFilteraccept in interface EventFilter<C>event - Event to be filtered in or out.EventFilter.accept(Event)Copyright © 2017. All rights reserved.