Package com.vaadin.data.util.filter
Class Not
- java.lang.Object
-
- com.vaadin.data.util.filter.Not
-
- All Implemented Interfaces:
Container.Filter,Serializable
public final class Not extends Object implements Container.Filter
Negating filter that accepts the items rejected by another filter. This filter directly supports in-memory filtering when the negated filter does so.- Since:
- 6.6
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Not(Container.Filter filter)Constructs a filter that negates a filter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanappliesToProperty(Object propertyId)Returns true if a change in the named property may affect the filtering result.booleanequals(Object obj)Container.FiltergetFilter()Returns the negated filter.inthashCode()booleanpassesFilter(Object itemId, Item item)Check if an item passes the filter (in-memory filtering).
-
-
-
Constructor Detail
-
Not
public Not(Container.Filter filter)
Constructs a filter that negates a filter.- Parameters:
filter-Container.Filterto negate, not-null
-
-
Method Detail
-
getFilter
public Container.Filter getFilter()
Returns the negated filter.- Returns:
- Filter
-
passesFilter
public boolean passesFilter(Object itemId, Item item) throws UnsupportedOperationException
Description copied from interface:Container.FilterCheck if an item passes the filter (in-memory filtering).- Specified by:
passesFilterin interfaceContainer.Filter- 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:
UnsupportedOperationException- if the filter cannot be used for in-memory filtering
-
appliesToProperty
public boolean appliesToProperty(Object propertyId)
Returns true if a change in the named property may affect the filtering result. Return value is the same asappliesToProperty(Object)for the negated filter.- Specified by:
appliesToPropertyin interfaceContainer.Filter- Returns:
- boolean
-
-