|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.labs.minion.CompositeResultsFilter
public class CompositeResultsFilter
A class that composes a number of individual results filter. In order for a result to pass this filter, it must pass each of the individual filters. Note that in order for this class to really be serializable, the filters it's holding must be serializable!
Constructor Summary | |
---|---|
CompositeResultsFilter(java.util.List<ResultsFilter> filters)
Creates a composite filter. |
|
CompositeResultsFilter(ResultsFilter f1,
ResultsFilter f2)
Creates a composite of two filters. |
Method Summary | |
---|---|
void |
addFilter(ResultsFilter rf)
Adds a filter to the list of filters to apply. |
boolean |
filter(ResultAccessor ra)
Runs the filter against the result currently under consideration. |
int |
getPassed()
Gets the number of times that a result passed the filter. |
int |
getTested()
Gets the number of times that the filter was used during the collection of search results. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompositeResultsFilter(java.util.List<ResultsFilter> filters)
filters
- the filters to applypublic CompositeResultsFilter(ResultsFilter f1, ResultsFilter f2)
Method Detail |
---|
public void addFilter(ResultsFilter rf)
rf
- the filter to add.public boolean filter(ResultAccessor ra)
ResultsFilter
filter
in interface ResultsFilter
ra
- an accessor that can be used to get information about the current
result. Note that the accessor is only valid for this call of the filter.
true
if the current result should be included in the
results returned to the user, false
if it should not.public int getTested()
ResultsFilter
getTested
in interface ResultsFilter
public int getPassed()
ResultsFilter
getPassed
in interface ResultsFilter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |