com.vaadin.data.util.filter
Class Not

java.lang.Object
  extended by 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
Not(Container.Filter filter)
          Constructs a filter that negates a filter.
 
Method Summary
 boolean appliesToProperty(Object propertyId)
          Returns true if a change in the named property may affect the filtering result.
 boolean equals(Object obj)
           
 Container.Filter getFilter()
          Returns the negated filter.
 int hashCode()
           
 boolean passesFilter(Object itemId, Item item)
          Check if an item passes the filter (in-memory filtering).
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Not

public Not(Container.Filter filter)
Constructs a filter that negates a filter.

Parameters:
filter - Container.Filter to 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.Filter
Check if an item passes the filter (in-memory filtering).

Specified by:
passesFilter in interface Container.Filter
Parameters:
itemId - identifier of the item being filtered; may be null when the item is being added to the container
item - 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 as appliesToProperty(Object) for the negated filter.

Specified by:
appliesToProperty in interface Container.Filter
Returns:
boolean

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.