org.ow2.clif.storage.lib.util
Class DateEventFilter

java.lang.Object
  extended by org.ow2.clif.storage.lib.util.DateEventFilter
All Implemented Interfaces:
java.io.Serializable, EventFilter

public class DateEventFilter
extends java.lang.Object
implements EventFilter

Helper class for filtering blade events according to their date.

Author:
Bruno Dillenseger
See Also:
Serialized Form

Constructor Summary
DateEventFilter(long from, long to)
          Creates a new blade event filter selecting events whose date is between the given bounds (inclusive).
 
Method Summary
 boolean accept(BladeEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateEventFilter

public DateEventFilter(long from,
                       long to)
Creates a new blade event filter selecting events whose date is between the given bounds (inclusive). If the lower bound is negative, then all events prior to the upper bound are accepted. If the upper bound is negative, then all events after the lower bound are accepted. If both the upper bound and the lower bound are negative, then all events are accepted. If the lower bound is greater than the upper bound, then no event is accepted.

Parameters:
from - the lower date bound (inclusive), unless negative
to - the upper date bound (inclusive), unless negative
Method Detail

accept

public boolean accept(BladeEvent event)
Specified by:
accept in interface EventFilter