JIDE 3.5.15

com.jidesoft.filter
Class OrFilter

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

public class OrFilter
extends MultipleFilters

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

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.jidesoft.filter.Filter
ALL, CUSTOM, NULL, SEPARATOR
 
Constructor Summary
OrFilter()
           
OrFilter(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

OrFilter

public OrFilter()

OrFilter

public OrFilter(Filter... filters)
Method Detail

isValueFiltered

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

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

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 smaller or equal than the input filter. Otherwise false.

JIDE 3.5.15