JIDE 3.5.15

com.jidesoft.filter
Class AndFilter

java.lang.Object
  extended by com.jidesoft.filter.AbstractFilter
      extended by com.jidesoft.filter.MultipleFilters
          extended by com.jidesoft.filter.AndFilter
All Implemented Interfaces:
Filter, ObjectGrouperSupport, Serializable, Cloneable

public class AndFilter
extends MultipleFilters

An filter which filters a value if any one of its filters filters away the value. In the other word, it is an AND logic.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.jidesoft.filter.Filter
ALL, CUSTOM, NULL, SEPARATOR
 
Constructor Summary
AndFilter()
           
AndFilter(Filter... filters)
           
 
Method Summary
 boolean isValueFiltered(Object value)
          This method will call isValueFiltered from its filters.
 boolean stricterThan(Filter inputFilter)
          Check if this filter is stricter than the input filter while the two filters are with the same class.
 
Methods inherited from class com.jidesoft.filter.MultipleFilters
addFilter, clearFilters, clone, getFilters, removeFilter, setFilters
 
Methods inherited from class com.jidesoft.filter.AbstractFilter
addFilterListener, fireFilterChanged, fireFilterContentChanged, fireFilterDisabled, fireFilterEnabled, fireFilterNameChanged, getConditionString, getFilterFactory, getFilterFactoryName, getFilterListeners, getName, getObjectGrouper, getObjectGrouperName, getPreference, isEnabled, isFilterValid, removeFilterListener, setEnabled, setFilterFactory, setFilterFactoryName, setName, setObjectGrouper, setObjectGrouperName, setPreference
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AndFilter

public AndFilter()

AndFilter

public AndFilter(Filter... filters)
Method Detail

isValueFiltered

public boolean isValueFiltered(Object value)
This method will call isValueFiltered from its filters. If one of the filters returns true, this method will return true.

Parameters:
value - the value to be filtered
Returns:
true if one of the filters returns true. Otherwise false.

stricterThan

public boolean stricterThan(Filter inputFilter)
Check if this filter is stricter than the input filter while the two filters are with the same class.

Please be noted that it's a very loose comparison, we will compare the filters contained one by one only. Don't expect it to be very concise.

Specified by:
stricterThan in interface Filter
Overrides:
stricterThan in class AbstractFilter
Parameters:
inputFilter - the input filter
Returns:
true if all the filters contained in this filter are stricter than the input filter AND the number of filters are larger or equal than the input filter. Otherwise false.

JIDE 3.5.15