anl.aida.util
Class AndFilter<T>

java.lang.Object
  extended by anl.aida.util.AndFilter<T>
All Implemented Interfaces:
Filter<T>

public class AndFilter<T>
extends java.lang.Object
implements Filter<T>

An aggregate Filter that returns true if each of its members Filters returns true.


Field Summary
private  java.util.List<Filter<T>> filters
           
 
Constructor Summary
AndFilter(Filter<T>... filters)
           
 
Method Summary
 boolean evaluate(T item)
          Evaluates the specified item against all the filters in this filter and returns true if they all pass, otherwise false.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filters

private java.util.List<Filter<T>> filters
Constructor Detail

AndFilter

public AndFilter(Filter<T>... filters)
Method Detail

evaluate

public boolean evaluate(T item)
Evaluates the specified item against all the filters in this filter and returns true if they all pass, otherwise false.

Specified by:
evaluate in interface Filter<T>
Parameters:
item - the item to evaluate
Returns:
true if the item passes all the filters, otherwise false.