org.shapelogic.predicate
Class CompositePredicate<T>

java.lang.Object
  extended by org.shapelogic.predicate.CompositePredicate<T>
Type Parameters:
T -
All Implemented Interfaces:
Predicate<T>
Direct Known Subclasses:
AllPredicate, AnyPredicate, OnePredicate

public abstract class CompositePredicate<T>
extends java.lang.Object
implements Predicate<T>

All component predicates have to be true.
Same functionality as AllPredicate in Apache Commons.

Author:
Sami Badawi

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

Field Detail

_predicates

protected final Predicate<T>[] _predicates
Constructor Detail

CompositePredicate

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

getPredicates

public Predicate<T>[] getPredicates()

evaluate

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

Specified by:
evaluate in interface Predicate<T>


Copyright © 2008. All Rights Reserved.