Class Or
java.lang.Object
com.vaadin.featurepack.data.util.filter.AbstractJunctionFilter
com.vaadin.featurepack.data.util.filter.Or
- All Implemented Interfaces:
Container.Filter,Serializable
A compound
Container.Filter that accepts an item if any of its filters accept
the item.
If no filters are given, the filter should reject all items.
This filter also directly supports in-memory filtering when all sub-filters
do so.- See Also:
-
Field Summary
Fields inherited from class com.vaadin.featurepack.data.util.filter.AbstractJunctionFilter
filters -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanappliesToProperty(Object propertyId) Returns true if a change in the named property may affect the filtering result.booleanpassesFilter(Object itemId, Item item) Check if an item passes the filter (in-memory filtering).Methods inherited from class com.vaadin.featurepack.data.util.filter.AbstractJunctionFilter
equals, getFilters, hashCode
-
Constructor Details
-
Or
- Parameters:
filters- filters of which the Or filter will be composed
-
-
Method Details
-
passesFilter
Description copied from interface:Container.FilterCheck if an item passes the filter (in-memory filtering).- Parameters:
itemId- identifier of the item being filtered; may be null when the item is being added to the containeritem- the item being filtered- Returns:
- true if the item is accepted by this filter
- Throws:
UnsupportedFilterException
-
appliesToProperty
Returns true if a change in the named property may affect the filtering result. If some of the sub-filters are not in-memory filters, true is returned. By default, all sub-filters are iterated to check if any of them applies. If there are no sub-filters, true is returned as an empty Or rejects all items.- Specified by:
appliesToPropertyin interfaceContainer.Filter- Overrides:
appliesToPropertyin classAbstractJunctionFilter- Parameters:
propertyId-- Returns:
- true if the filtering result may/does change based on changes to the property identified by propertyId
-