com.jidesoft.filter
Class OrFilter
java.lang.Object
com.jidesoft.filter.AbstractFilter
com.jidesoft.filter.MultipleFilters
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
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.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 |
OrFilter
public OrFilter()
OrFilter
public OrFilter(Filter... filters)
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.