java.lang.Object
com.vaadin.featurepack.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.
See Also:
  • Constructor Details

  • Method Details

    • 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
      Parameters:
      propertyId -
      Returns:
      boolean
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object