com.sun.labs.minion
Interface ResultsFilter

All Known Implementing Classes:
CompositeResultsFilter, CrossIndexDV.ArtistFilter

public interface ResultsFilter

A filter for results that can be applied against a result set when retrieving results for display. An implementation of this interface can be passed to the ResultSet.getResults(int,int) method where it will be used to include (or exclude) particular results from the results that are returned to the user.


Method Summary
 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.
 

Method Detail

filter

boolean filter(ResultAccessor ra)
Runs the filter against the result currently under consideration.

Parameters:
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.
Returns:
true if the current result should be included in the results returned to the user, false if it should not.

getTested

int getTested()
Gets the number of times that the filter was used during the collection of search results.


getPassed

int getPassed()
Gets the number of times that a result passed the filter.