org.jcreme.filters
Class ANDFilter

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

public class ANDFilter
extends BaseReportFilter

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

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

Field Summary
(package private) static long serialVersionUID
           
 
Constructor Summary
ANDFilter(ReportFilter[] filters)
          Creates new ANDFilter
 
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 ANDFilter has the component filters clones as components.
 ReportFilter[] getFilters()
          This method gives access to the filters combined by this ANDFilter.
 
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

ANDFilter

public ANDFilter(ReportFilter[] filters)
Creates new ANDFilter

Parameters:
filters - the filters combined by this ANDFilter.
Method Detail

accept

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

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

getFilters

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

Returns:
the component filters.

clone

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

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


Copyright 2006 null. All Rights Reserved.