org.jcreme.filters
Class ORFilter

java.lang.Object
  extended byorg.jcreme.filters.BaseReportFilter
      extended byorg.jcreme.filters.ORFilter
All Implemented Interfaces:
java.lang.Cloneable, Filter, ReportFilter, java.io.Serializable

public class ORFilter
extends BaseReportFilter

This implementation of the ReportFilter interface enables to combine a number of other ReportFilter with OR logic operators. This means that a value tested through this filter would have to qualify for one component filter.

Version:
$Revision: 1.2 $
Author:
$Author: dbregeon $
See Also:
Serialized Form

Field Summary
(package private) static long serialVersionUID
           
 
Constructor Summary
ORFilter(ReportFilter[] filters)
          Creates new ORFilter
ORFilter(ReportFilter firstFilter, ReportFilter secondFilter)
          Creates a binary ORFilter
 
Method Summary
 boolean accept(java.lang.Object obj)
          This is the actual filtering method.
 java.lang.Object clone()
          This method clones this filter and the resulting ORFilter has the component filters clones as components.
 ReportFilter[] getFilters()
          This method gives access to the filters combined by this ORFilter.
 
Methods inherited from class org.jcreme.filters.BaseReportFilter
addFilterChangeListener, buildEvent, filtersAreEqual, filtersAreEqual, fireFilterChangeEvent, removeFilterChangeListener
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

ORFilter

public ORFilter(ReportFilter[] filters)
Creates new ORFilter

Parameters:
filters - the filters combined by this ORFilter.

ORFilter

public ORFilter(ReportFilter firstFilter,
                ReportFilter secondFilter)
Creates a binary ORFilter

Parameters:
firstFilter - the first filter in the pair.
secondFilter - the second filter in the pair.
Method Detail

accept

public boolean accept(java.lang.Object obj)
This is the actual filtering method.

Parameters:
obj - the Object to Filter.
Returns:
true if the given object satisfies one of the conditions of the filter.

getFilters

public ReportFilter[] getFilters()
This method gives access to the filters combined by this ORFilter.

Returns:
the component filters.

clone

public java.lang.Object clone()
This method clones this filter and the resulting ORFilter has the component filters clones as components.

Specified by:
clone in interface Filter
Overrides:
clone in class BaseReportFilter
Returns:
the cloned ORFilter.


Copyright 2006 null. All Rights Reserved.