Class Or

    • Constructor Detail

      • Or

        public Or​(Container.Filter... filters)
        Parameters:
        filters - filters of which the Or filter will be composed
    • Method Detail

      • passesFilter

        public boolean passesFilter​(Object itemId,
                                    Item item)
                             throws UnsupportedFilterException
        Description copied from interface: Container.Filter
        Check 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 container
        item - the item being filtered
        Returns:
        true if the item is accepted by this filter
        Throws:
        UnsupportedFilterException
      • appliesToProperty

        public boolean appliesToProperty​(Object propertyId)
        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:
        appliesToProperty in interface Container.Filter
        Overrides:
        appliesToProperty in class AbstractJunctionFilter
        Returns:
        true if the filtering result may/does change based on changes to the property identified by propertyId