org.shapelogic.predicate
Class AnyPredicate<T>

java.lang.Object
  extended by org.shapelogic.predicate.CompositePredicate<T>
      extended by org.shapelogic.predicate.AnyPredicate<T>
Type Parameters:
T -
All Implemented Interfaces:
Predicate<T>

public class AnyPredicate<T>
extends CompositePredicate<T>

At least one component predicates have to be true.
Same functionality as AnyPredicate in Apache Commons.

Author:
Sami Badawi

Field Summary
 
Fields inherited from class org.shapelogic.predicate.CompositePredicate
_predicates
 
Constructor Summary
AnyPredicate(Predicate<T>[] predicates)
           
 
Method Summary
 boolean evaluate(T input)
          Checks if a binary predicate relation holds.
 
Methods inherited from class org.shapelogic.predicate.CompositePredicate
getPredicates
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnyPredicate

public AnyPredicate(Predicate<T>[] predicates)
Method Detail

evaluate

public boolean evaluate(T input)
Description copied from interface: Predicate
Checks if a binary predicate relation holds.

Specified by:
evaluate in interface Predicate<T>
Specified by:
evaluate in class CompositePredicate<T>


Copyright © 2008. All Rights Reserved.