com.linkedin.data.it
Class OrPredicate

java.lang.Object
  extended by com.linkedin.data.it.OrPredicate
All Implemented Interfaces:
Predicate

public class OrPredicate
extends java.lang.Object
implements Predicate

Evaluate if any of the Predicate's is true.

If there are no Predicate's to evaluate, then this predicate returns false. Furthermore, the predicates are evaluated in the order they are provided, once a predicate evaluates to true, the remaining predicates are not evaluated, i.e. the semantics is similar to ||.


Constructor Summary
OrPredicate(java.util.Collection<? extends Predicate> predicates)
          Constructor.
OrPredicate(Predicate... predicates)
          Constructor.
 
Method Summary
 boolean evaluate(DataElement element)
          Evaluate the predicate to test an DataElement.
 java.util.List<Predicate> getChildPredicates()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrPredicate

public OrPredicate(Predicate... predicates)
Constructor.

Parameters:
predicates - to evaluate, it should not be modified once passed to the constructor.

OrPredicate

public OrPredicate(java.util.Collection<? extends Predicate> predicates)
Constructor.

Parameters:
predicates - to evaluate, it should not be modified once passed to the constructor.
Method Detail

evaluate

public boolean evaluate(DataElement element)
Description copied from interface: Predicate
Evaluate the predicate to test an DataElement.

Specified by:
evaluate in interface Predicate
Parameters:
element - provides the DataElement to evaluate.
Returns:
true if the DataElement satisfies the predicate.

getChildPredicates

public java.util.List<Predicate> getChildPredicates()