Filters the given list of items by using the specified filter. The <code>runningBeforeProcessing</code> flag
is passed to indicated the filter in which phase it is being executed (after or before processing).
192513
protected List<Item> doFilter(List<Item> items, ItemFilter filter, boolean runningBeforeProcessing) {
        List<Item> acceptedItems = new ArrayList<>();
        List<Item> rejectedItems = new ArrayList<>();

        for (Item item : items) {
            if (filter.accepts(item, acceptedItems, rejectedItems, runningBeforeProcessing)) {
                acceptedItems.add(item);
            } else {
                rejectedItems.add(item);
            }
        }

        if (logger.isDebugEnabled()) {
            logger.debug("Items filtered from " + items + " by " + filter + ": " + acceptedItems);
        }

        return acceptedItems;
    }
367186
public RunList<R> completedOnly() {
        return filter(new Predicate<R>() {
            public boolean apply(R r) {
                return !r.isBuilding();
            }
        });
    }
1104687
private void filter(Predicate<TreeItem<S>> predicate) {
        if (task != null) {
            task.cancel(false);
        }
        task = threadPool.schedule(filterRunnable, 200, TimeUnit.MILLISECONDS);
    }
772794
@SuppressWarnings("unchecked")
    public static boolean isRunnable(Class cl, String methodName, List<FilterDefinition> filters) {
        try {
            Method method = cl.getMethod(methodName);

            return isRunnable(cl, method, filters);
        } catch (NoSuchMethodException | SecurityException e) {
            return true;
        }
    }
388843
public OperationFuture<List<AlertPolicy>> delete(AlertPolicyFilter filter) {
        List<AlertPolicy> policyRefs = getRefsFromFilter(filter);
        return delete(policyRefs.toArray(new AlertPolicy[policyRefs.size()]));
    }
314120
public static appflowcollector[] get_filtered(nitro_service service, String filter) throws Exception{
		appflowcollector obj = new appflowcollector();
		options option = new options();
		option.set_filter(filter);
		appflowcollector[] response = (appflowcollector[]) obj.getfiltered(service, option);
		return response;
	}
680501
public static <T> List<T> filter(Collection<T> c, Filter<T> filter){
        if(c.size()==0)
            return Collections.emptyList();

        List<T> filteredList = new ArrayList<T>(c.size());
        for(T element: c){
            if(filter.select(element))
                filteredList.add(element);
        }
        return filteredList;
    }
105792
@Override
    public ListT<W,T> filter(final Predicate<? super T> test) {
        return of(run.map(seq -> seq.filter(test)));
    }
67048
public final AbstractItem findFirstMatching(Filter filter) throws MessageStoreException
    {
        AbstractItem item = null;
        for (int priority = Priorities.HIGHEST_PRIORITY; null == item
                && priority >= Priorities.LOWEST_PRIORITY; priority--)
        {
            LinkedList tl = _prioritySublists[priority];
            if (null != tl)
            {
                item = tl.findFirstMatching(filter);
            }
        }
        return item;
    }
1201891
public <T extends ViewHandler<R>> T processing(boolean flag) {
        lock.lock();
        try {
            setProcessing(flag);
            return (T)this;
        }
        finally {
            lock.unlock();
        }
    }
986653
@SuppressWarnings("checkstyle:npathcomplexity")
    @Override
    public int doFilter(EventFilter filter, Data dataKey, Object oldValue, Object dataValue, EntryEventType eventType,
                        String mapNameOrNull) {
        if (filter instanceof MapPartitionLostEventFilter) {
            return FILTER_DOES_NOT_MATCH;
        }

        // the order of the following ifs is important!
        // QueryEventFilter is instance of EntryEventFilter
        if (filter instanceof EventListenerFilter) {
            if (!filter.eval(eventType.getType())) {
                return FILTER_DOES_NOT_MATCH;
            } else {
                filter = ((EventListenerFilter) filter).getEventFilter();
            }
        }
        if (filter instanceof TrueEventFilter) {
            return eventType.getType();
        }
        if (filter instanceof QueryEventFilter) {
            return processQueryEventFilter(filter, eventType, dataKey, oldValue, dataValue, mapNameOrNull)
                    ? eventType.getType() : FILTER_DOES_NOT_MATCH;
        }
        if (filter instanceof EntryEventFilter) {
            return processEntryEventFilter(filter, dataKey) ? eventType.getType() : FILTER_DOES_NOT_MATCH;
        }
        throw new IllegalArgumentException("Unknown EventFilter type = [" + filter.getClass().getCanonicalName() + "]");
    }
58222
public ItemFilter<Model, Item> withFilterPredicate(IItemAdapter.Predicate<Item> filterPredicate) {
        this.mFilterPredicate = filterPredicate;
        return this;
    }
746206
public static void after(String path, String acceptType, Filter... filters) {
        for (Filter filter : filters) {
            getInstance().after(path, acceptType, filter);
        }
    }
633763
public static <T> CloseableIterator<T> filter(final CloseableIterator<T> iterator, final Predicate<T> filter) {
        return wrap(Iterators.filter(iterator, filter::test), iterator);
    }
472684
public boolean filterMatches(AbstractItem item)
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "filterMatches", item);

		/* Cast the incoming item to a subscriptionState object. if it is not, an
		 * exception will be thrown and the match will fail */

    ConsumerDispatcherState subState = null;

    if (item instanceof DurableSubscriptionItemStream) 
    {
      try
      {
        subState = ((DurableSubscriptionItemStream) item).getConsumerDispatcherState();
      }
      catch (Exception e)
      {
        FFDCFilter.processException(
          e,
          "com.ibm.ws.sib.processor.impl.store.filters.SubscriptionStateFilter.filterMatches",
          "1:180:1.33.1.1",
          this);

        SibTr.exception(tc, e);
        
        if (tc.isEntryEnabled())
          SibTr.exit(tc, "filterMatches", e);
          
        return false;
      }
  
  		/* If this filter is a subscriptionId filter, check for a match */
  		
      if (_subscriptionId != null)
      {
        boolean retval = (subState.getSubscriberID().equals(_subscriptionId));
        if (tc.isEntryEnabled())
          SibTr.exit(tc, "filterMatches", Boolean.valueOf(retval));
        return retval;
      }
  
  		/* If this filter is a destination name filter, check for a match */
  		
      if (_destination != null)
      {
        boolean retval = (subState.getTopicSpaceUuid().equals(_destination));
        if (tc.isEntryEnabled())
          SibTr.exit(tc, "filterMatches", Boolean.valueOf(retval));
        return retval;
      }
      
      /* If this filter is for a specific consumer dispatcher state object, check for a match */

      if (_consumerDispatcherState != null)
      {
        boolean retval = (subState == _consumerDispatcherState);
        if (tc.isEntryEnabled())
          SibTr.exit(tc, "filterMatches", Boolean.valueOf(retval));
        return retval;
      }

      //The match succeeds if its a durable subscription and no specific matching is requested
      if ((_destination == null) && (_subscriptionId == null) && (_consumerDispatcherState == null))
      {
        if (tc.isEntryEnabled())
          SibTr.exit(tc, "filterMatches", Boolean.TRUE);
        return true;
      }
    }
    /* If filter type has not been set, the match fails */
    
    if (tc.isEntryEnabled())
      SibTr.exit(tc, "filterMatches", Boolean.FALSE);

    return false;

  }
951422
public static cachepolicylabel[] get_filtered(nitro_service service, String filter) throws Exception{
		cachepolicylabel obj = new cachepolicylabel();
		options option = new options();
		option.set_filter(filter);
		cachepolicylabel[] response = (cachepolicylabel[]) obj.getfiltered(service, option);
		return response;
	}
56764
@Override
    public List<T> filter(final List<T> list) throws CouldNotPerformException {
        beforeFilter();
        return ListFilter.super.filter(list);
    }