Interface EventFilter
-
- All Known Implementing Classes:
AbstractEventFilter
,AndEventFilter
,ChainedEventFilter
,ClassEventFilter
,OrEventFilter
,TypeEventFilter
public interface EventFilter
Definition of an interface for filtering events.
This interface defines a simple method for testing whether a passed in object is accepted by the filter. Note that objects processed by an event filter are of type
Object
rather than an event type; this may be useful for special cases (e.g. if the objects dealt with are not always event objects) and is included here to gain a greater flexibility. Simple event filters that do not need such advanced processing should subclass the
base class, which hides this complexity.AbstractEventFilter
- Version:
- $Id: EventFilter.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
accept(Object obj)
Tests whether the passed in object is accepted by this filter.
-
-
-
Method Detail
-
accept
boolean accept(Object obj)
Tests whether the passed in object is accepted by this filter. This is the main method for filtering. Note that it deals with the generic Object type rather than an event type. Before this method is called the other "declarative" methods are invoked to find out the minimum criteria for supported objects. Only if these criteria are matched, the object is passed to the filter method.- Parameters:
obj
- the object to be tested- Returns:
- a flag whether the passed in object is accepted
-
-