public abstract class ComposedFilter extends Filter implements IFilterObserver
Abstract parent class to support the composition of multiple filters.
The exact composition semantics (and / or / not) are not defined.
RowFilter.ComparisonType, RowFilter.Entry<M,I>
Modifier and Type | Field and Description |
---|---|
protected Set<IFilter> |
filters
Set of associated IFilters.
|
Modifier | Constructor and Description |
---|---|
protected |
ComposedFilter()
Default constructor.
|
protected |
ComposedFilter(IFilter... observables)
Constructor built up out of one or more
IFilter instances. |
Modifier and Type | Method and Description |
---|---|
void |
addFilter(IFilter... filtersToAdd)
Subscribes one or more
IFilter instances to
receive filter events from this composition filter. |
void |
filterUpdated(IFilter filter)
Notification made by the observer when the associated
IFilter instance updates the held filter. |
Set<IFilter> |
getFilters()
Returns all
IFilter instances previously
added. |
protected boolean |
isDisabled(IFilter filter)
Returns true if there is information of this filter as disabled.
|
void |
removeFilter(IFilter... filtersToRemove)
Unsubscribes one or more
IFilter s that were
previously subscribed to receive filter events. |
void |
setEnabled(boolean enable)
Enables/Disables the filter.
|
addFilterObserver, getFilterObservers, isEnabled, removeFilterObserver, reportFilterUpdatedToObservers
andFilter, dateFilter, include, notFilter, numberFilter, orFilter, regexFilter
public void addFilter(IFilter... filtersToAdd)
IFilter
instances to
receive filter events from this composition filter.public void removeFilter(IFilter... filtersToRemove)
IFilter
s that were
previously subscribed to receive filter events.public void filterUpdated(IFilter filter)
IFilterObserver
Notification made by the observer when the associated IFilter
instance updates the held filter.
filterUpdated
in interface IFilterObserver
IFilterObserver.filterUpdated(IFilter)
public void setEnabled(boolean enable)
IFilter
setEnabled
in interface IFilter
setEnabled
in class Filter
IFilter.setEnabled(boolean)
protected boolean isDisabled(IFilter filter)