com.veromodo.tempo.filters.rules
Class AndPredicate<T>

java.lang.Object
  extended by com.veromodo.tempo.filters.rules.AndPredicate<T>
Type Parameters:
T - the type of objects which the predicates are to evaluate
All Implemented Interfaces:
SemanticPredicate<T>

public class AndPredicate<T>
extends java.lang.Object
implements SemanticPredicate<T>

Defines an AND of semantic predicates into a single SemanticPredicate

See Also:
SemanticPredicate

Constructor Summary
AndPredicate()
           
 
Method Summary
 void add(SemanticPredicate<T> pred)
           
 void addAll(java.util.Collection<SemanticPredicate<T>> preds)
           
 boolean eval(T n)
          evaluates the object n.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AndPredicate

public AndPredicate()
Method Detail

add

public void add(SemanticPredicate<T> pred)

addAll

public void addAll(java.util.Collection<SemanticPredicate<T>> preds)

eval

public boolean eval(T n)
Description copied from interface: SemanticPredicate
evaluates the object n. Returns true if the object matches the critera, false otherwise. Reports errors if nessisary.

Specified by:
eval in interface SemanticPredicate<T>
Parameters:
n - an object to be checked.
Returns:
true if the object matches.