|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.tudelft.simulation.language.filters.AbstractFilter
public abstract class AbstractFilter
The abstract filter forms the abstract class for all filters. The filter method should be implemented by all subclasses. This filter method should have the same semantics as the accept(inverted=false) method.
(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
Field Summary | |
---|---|
protected boolean |
inverted
is this filter inverted |
Constructor Summary | |
---|---|
AbstractFilter()
constructs a new AbstractFilter |
Method Summary | |
---|---|
boolean |
accept(Object entry)
a filter defines whether to accept a value in a chart |
Filterinterface |
and(Filterinterface filter)
adds filter to this filter and returns the composed filter |
protected abstract boolean |
filter(Object entry)
filters the entry. |
abstract String |
getCriterium()
returns the filter criterium |
boolean |
isInverted()
is the filter inverted? |
Filterinterface |
or(Filterinterface filter)
creates a new composite filter which is one or two |
void |
setInverted(boolean inverted)
inverts the filter |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected boolean inverted
Constructor Detail |
---|
public AbstractFilter()
Method Detail |
---|
public boolean isInverted()
Filterinterface
isInverted
in interface Filterinterface
Filterinterface.isInverted()
public void setInverted(boolean inverted)
Filterinterface
setInverted
in interface Filterinterface
inverted
- whether to invert the filter#setInverted(boolean)
public boolean accept(Object entry)
Filterinterface
accept
in interface Filterinterface
entry
- the entry to filter
Filterinterface.accept(java.lang.Object)
protected abstract boolean filter(Object entry)
entry
- the entry to filter.
public abstract String getCriterium()
getCriterium
in interface Filterinterface
public Filterinterface and(Filterinterface filter)
and
in interface Filterinterface
filter
- the filter to add
public Filterinterface or(Filterinterface filter)
or
in interface Filterinterface
filter
- the filter to add
public String toString()
toString
in class Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |