org.shapelogic.filter
Class OrFilter<BaseClass,Element>

java.lang.Object
  extended by org.shapelogic.filter.BaseFilter<BaseClass,Element>
      extended by org.shapelogic.filter.OrFilter<BaseClass,Element>
All Implemented Interfaces:
org.apache.commons.collections.Predicate, IFilter<BaseClass,Element>

public class OrFilter<BaseClass,Element>
extends BaseFilter<BaseClass,Element>

Similar to OrPredicate 1 filter has to be true for this to be true

Author:
Sami Badawi

Field Summary
protected  IFilter<BaseClass,Element> _filter1
           
protected  IFilter<BaseClass,Element> _filter2
           
 
Fields inherited from class org.shapelogic.filter.BaseFilter
_collection, _constraint, _parent
 
Constructor Summary
OrFilter()
           
OrFilter(IFilter<BaseClass,Element> filter1, IFilter<BaseClass,Element> filter2)
           
 
Method Summary
 boolean evaluate(java.lang.Object arg0)
           
 void setParent(BaseClass parent)
           
 void setup()
           
 
Methods inherited from class org.shapelogic.filter.BaseFilter
filter, getCollection, getConstraint, getParent, setCollection, setConstraint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_filter1

protected IFilter<BaseClass,Element> _filter1

_filter2

protected IFilter<BaseClass,Element> _filter2
Constructor Detail

OrFilter

public OrFilter()

OrFilter

public OrFilter(IFilter<BaseClass,Element> filter1,
                IFilter<BaseClass,Element> filter2)
Method Detail

evaluate

public boolean evaluate(java.lang.Object arg0)
Specified by:
evaluate in interface org.apache.commons.collections.Predicate
Specified by:
evaluate in class BaseFilter<BaseClass,Element>

setup

public void setup()
           throws java.lang.Exception
Specified by:
setup in interface IFilter<BaseClass,Element>
Overrides:
setup in class BaseFilter<BaseClass,Element>
Throws:
java.lang.Exception

setParent

public void setParent(BaseClass parent)
Specified by:
setParent in interface IFilter<BaseClass,Element>
Overrides:
setParent in class BaseFilter<BaseClass,Element>


Copyright © 2009. All Rights Reserved.