nl.tudelft.simulation.language.filters
Class CompositeFilter

java.lang.Object
  extended bynl.tudelft.simulation.language.filters.AbstractFilter
      extended bynl.tudelft.simulation.language.filters.CompositeFilter
All Implemented Interfaces:
Filterinterface

public class CompositeFilter
extends AbstractFilter

The composite filter combines two filters.

(c) copyright 2004 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl/dsol
License of use: General Public License (GPL) , no warranty

Since:
1.2
Version:
1.0 Oct 26, 2004
Author:
Niels Lang Peter Jacobs

Field Summary
static short ADD
          the ADD operator
static short OR
          the OR operator
 
Fields inherited from class nl.tudelft.simulation.language.filters.AbstractFilter
inverted
 
Constructor Summary
CompositeFilter(Filterinterface filter1, Filterinterface filter2, short operator)
          constructs a new CompositeFilter
 
Method Summary
protected  boolean filter(java.lang.Object entry)
          filters the entry.
 java.lang.String getCriterium()
          returns the filter criterium
 
Methods inherited from class nl.tudelft.simulation.language.filters.AbstractFilter
accept, add, isInverted, or, setInverted, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ADD

public static final short ADD
the ADD operator

See Also:
Constant Field Values

OR

public static final short OR
the OR operator

See Also:
Constant Field Values
Constructor Detail

CompositeFilter

public CompositeFilter(Filterinterface filter1,
                       Filterinterface filter2,
                       short operator)
constructs a new CompositeFilter

Parameters:
filter1 - the first filter
filter2 - the second filter
operator - the operator (AND or OR)
Method Detail

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:
AbstractFilter.getCriterium()


Copyright © 2002-2004 Delft University of Technology, the Netherlands. All Rights Reserved.