org.activemath.events.impl
Class EventFilter

java.lang.Object
  extended by org.activemath.events.impl.EventFilter

public class EventFilter
extends Object

A filter for events, based on type name or event tag.


Constructor Summary
EventFilter(Class cls)
          Create event filter for event tag tag.
EventFilter(EventTag tag)
          Create event filter for event tag tag.
EventFilter(String type)
          Create event filter for event type type.
 
Method Summary
 boolean matches(ActivemathEvent event)
          Say if event matches this filter.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EventFilter

public EventFilter(String type)
Create event filter for event type type.


EventFilter

public EventFilter(EventTag tag)
Create event filter for event tag tag.


EventFilter

public EventFilter(Class cls)
Create event filter for event tag tag.

Method Detail

matches

public boolean matches(ActivemathEvent event)
Say if event matches this filter.

A type filter matches when the event type matches.

A tag filter matches when event tag matches. (@see EventTag.matches())

Returns:
true if event matches this filter

toString

public String toString()
Overrides:
toString in class Object