public abstract class AbstractFilter extends java.lang.Object implements Filter
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
type |
protected java.util.HashSet<EventId> |
whitelist |
Modifier | Constructor and Description |
---|---|
|
AbstractFilter(java.lang.Class<? extends AbstractFilter> type) |
protected |
AbstractFilter(java.lang.String type) |
Modifier and Type | Method and Description |
---|---|
abstract void |
dispachToObserver(FilterObserver o,
FilterAction a)
Helper method for double dispatch of Filter registrations
|
boolean |
mustSkip(EventId id)
returns whether events with the specified ID should be skipped or not.
|
void |
skip(EventId id)
skip this filter for any event with the specified ID.
|
void |
skipped(EventId id)
remove ID from the list after the corresponding event has been skipped.
|
abstract Event |
transform(Event e)
This method does the actual filtering step.
|
protected java.util.HashSet<EventId> whitelist
protected java.lang.String type
protected AbstractFilter(java.lang.String type)
public AbstractFilter(java.lang.Class<? extends AbstractFilter> type)
public abstract Event transform(Event e)
public void skip(EventId id)
public boolean mustSkip(EventId id)
id
- public void skipped(EventId id)
id
- public abstract void dispachToObserver(FilterObserver o, FilterAction a)
dispachToObserver
in interface Filter