nl.tudelft.simulation.language.filters
Class ModulusFilter
java.lang.Object
nl.tudelft.simulation.language.filters.AbstractFilter
nl.tudelft.simulation.language.filters.ModulusFilter
- All Implemented Interfaces:
- java.io.Serializable, Filterinterface
public class ModulusFilter
- extends AbstractFilter
The modulus filter only accepts the nth event where n % given modulus = 0.
(c) copyright 2002-2005 Delft University of Technology , the
Netherlands.
See for project information www.simulation.tudelft.nl/language
License of use: Lesser General Public License (LGPL)
, no warranty
- Since:
- 1.5
- Version:
- $Revision: 1.8 $ $Date: 2005/08/04 12:08:54 $
- Author:
- Peter Jacobs
- See Also:
- Serialized Form
|
Constructor Summary |
ModulusFilter(long modulus)
constructs a new ModulusFilter. |
|
Method Summary |
protected boolean |
filter(java.lang.Object entry)
filters the entry. |
java.lang.String |
getCriterium()
returns the filter criterium |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ModulusFilter
public ModulusFilter(long modulus)
- constructs a new ModulusFilter.
- Parameters:
modulus - the modulus to use
filter
protected boolean filter(java.lang.Object entry)
- Description copied from class:
AbstractFilter
- filters the entry. This method should be implemented by every filter
based on its semantic meaning.
- Specified by:
filter in class AbstractFilter
- Parameters:
entry - the entry to filter.
- Returns:
- whether to accept the value.
- See Also:
AbstractFilter.filter(java.lang.Object)
getCriterium
public java.lang.String getCriterium()
- Description copied from class:
AbstractFilter
- returns the filter criterium
- Specified by:
getCriterium in interface Filterinterface- Specified by:
getCriterium in class AbstractFilter
- Returns:
- the criterium
- See Also:
Filterinterface.getCriterium()
Copyright © 2002-2005 Delft University of Technology, the Netherlands. All Rights Reserved.