bp.eventSets
Class EventFilterForClass

java.lang.Object
  extended by bp.eventSets.EventFilterForClass
All Implemented Interfaces:
EventFilterInterface

public class EventFilterForClass
extends java.lang.Object
implements EventFilterInterface

A filter for the set of all events of a given class.


Field Summary
(package private)  java.lang.Class<?> theClass
           
 
Constructor Summary
EventFilterForClass(java.lang.Class<?> theClass)
          Constructor.
 
Method Summary
 boolean contains(java.lang.Object o)
          A function that implements the filtering logic.
 boolean testFields(java.lang.Object o)
          Tests whether the fields of the object match the required definition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theClass

java.lang.Class<?> theClass
Constructor Detail

EventFilterForClass

public EventFilterForClass(java.lang.Class<?> theClass)
Constructor.

Parameters:
theClass - The class of events matched by this filter.
Method Detail

contains

public boolean contains(java.lang.Object o)
Description copied from interface: EventFilterInterface
A function that implements the filtering logic.

Specified by:
contains in interface EventFilterInterface
Parameters:
o - A candidate object to be tested for matching the criteria of the filter.
Returns:
true if the object matches the criteria of the filter.
See Also:
EventFilterInterface.contains(java.lang.Object)

testFields

public boolean testFields(java.lang.Object o)
Tests whether the fields of the object match the required definition. By default, we don't pose any requirements for the fields (always return true).

Parameters:
o - Object to test (always of the expected class).
Returns:
true if the fields of the given object math the criterion represented by this filter.