Final all validation executor sets that match the provided filter.

@param aFilter
The filter to be used. May be <code>null</code> in which case the
result is the same as {@link #getAll()}.
@return Never <code>null</code> but maybe empty.
14918
@Nullable
  public IValidationExecutorSet findFirst (@Nonnull final Predicate <? super IValidationExecutorSet> aFilter)
  {
    return m_aRWLock.readLocked ( () -> m_aMap.findFirstValue (e -> aFilter.test (e.getValue ())));
  }
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;
    }
226648
public List<VirtualFile> getChildren(VirtualFileFilter filter) throws IOException {
        // isDirectory does the read security check
        if (!isDirectory()) { return Collections.emptyList(); }
        if (filter == null) { filter = MatchAllVirtualFileFilter.INSTANCE; }
        FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter, null);
        visit(visitor);
        return visitor.getMatched();
    }
963892
public <E extends Exception> boolean allMatch(Try.IntPredicate<E> filter) throws E {
        return allMatch(0, size(), filter);
    }
479892
private void validateFilter(Filter filter) throws IllegalArgumentException {
    switch (filter.getFilterTypeCase()) {
      case COMPOSITE_FILTER:
        for (Filter subFilter : filter.getCompositeFilter().getFiltersList()) {
          validateFilter(subFilter);
        }
        break;
      case PROPERTY_FILTER:
        if (UNSUPPORTED_OPERATORS.contains(filter.getPropertyFilter().getOp())) {
          throw new IllegalArgumentException("Query cannot have any inequality filters.");
        }
        break;
      default:
        throw new IllegalArgumentException(
            "Unsupported filter type: " + filter.getFilterTypeCase());
    }
  }
720389
public static void verify (final AbstractCodepointIterator aIter, final IntPredicate aFilter)
  {
    final CodepointIteratorRestricted rci = aIter.restrict (aFilter, false);
    while (rci.hasNext ())
      rci.next ();
  }
62345
public Iterator<?> getElements(Filter filter, int offset, int maxResultSize) throws LayerException {
		if (null == filter) {
			filter = Filter.INCLUDE;
		}
		List<Object> filteredList = new ArrayList<Object>();
		try {
			synchronized (featuresById) {
				for (Object feature : featuresById.values()) {
					if (filter.evaluate(feature)) {
						filteredList.add(feature);
					}
				}
			}
		} catch (Exception e) { // NOSONAR
			throw new LayerException(e, ExceptionCode.FILTER_EVALUATION_PROBLEM, filter, getId());
		}
		// Sorting of elements.
		if (comparator != null) {
			Collections.sort(filteredList, comparator);
		}
		if (maxResultSize > 0) {
			int fromIndex = Math.max(0, offset);
			int toIndex = Math.min(offset + maxResultSize, filteredList.size());
			toIndex = Math.max(fromIndex, toIndex);
			return filteredList.subList(fromIndex, toIndex).iterator();
		} else {
			return filteredList.iterator();
		}
	}
986814
public Collection<Member> members(MemberFilter filter) {
        return get(Member.class, (filter != null) ? filter : new MemberFilter());
    }
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;
    }
399109
public List<Row> search(ExtendedFilter filter)
    {
        SecondaryIndexSearcher mostSelective = getHighestSelectivityIndexSearcher(filter.getClause());
        if (mostSelective == null)
            return Collections.emptyList();
        else
            return mostSelective.search(filter);
    }
686548
@Override
    public List<FILTERTYPE> getAllFilter() {

        final List<FILTERTYPE> list = new ArrayList<FILTERTYPE>();
        final List<Node> nodeList = model.get("filter");
        for (final Node node : nodeList) {
            final FILTERTYPE filter = this.createNewFilterViewForModel(node);
            list.add(filter);
        }

        return list;
    }
1158632
public List<FilterDefinition> getFilters() {
		try {
			if (isStarted()) {
				final FilterAcknowledger acknowledger = new FilterAcknowledger();
				
				// Be sure that the emit/ack is synchronous to get the filters before the test are run
				new Thread(new Runnable() {
					@Override
					public void run() {
						try {
							LOGGER.finest("Retrieve filters");
							socket.emit("filters:get", acknowledger);
						}
						catch (Exception e) {
							LOGGER.finest("Unable to get the filters: " + e.getMessage());
							synchronized (acknowledger) {
								acknowledger.notify();
							}
						}
					}
				}).start();

				synchronized (acknowledger) {
					acknowledger.wait();
				}

				if (!acknowledger.hasFilters()) {
					for (FilterDefinition filter : acknowledger.getFilters()) {
						LOGGER.info("Filter element: " + filter);
					}
				}

				return acknowledger.getFilters();
			}
		}
		catch (Exception e) {
			LOGGER.warning("Unable to retrieve the filters from the agent. Cause: " + e.getMessage());
			e.printStackTrace();
			if (LOGGER.getLevel() == Level.FINEST) {
				LOGGER.log(Level.FINEST, "Exception: ", e);
			}
		}
		
		return null;
	}
1202164
public List<SquigglyNode> parse(String filter) {
        filter = StringUtils.trim(filter);

        if (StringUtils.isEmpty(filter)) {
            return Collections.emptyList();
        }

        // get it from the cache if we can
        List<SquigglyNode> cachedNodes = CACHE.getIfPresent(filter);

        if (cachedNodes != null) {
            return cachedNodes;
        }


        SquigglyExpressionLexer lexer = ThrowingErrorListener.overwrite(new SquigglyExpressionLexer(new ANTLRInputStream(filter)));
        SquigglyExpressionParser parser = ThrowingErrorListener.overwrite(new SquigglyExpressionParser(new CommonTokenStream(lexer)));

        Visitor visitor = new Visitor();
        List<SquigglyNode> nodes = Collections.unmodifiableList(visitor.visit(parser.parse()));

        CACHE.put(filter, nodes);
        return nodes;
    }
1136556
public Collection<Message> messages(MessageFilter filter) {
        return get(Message.class, (filter != null) ? filter : new MessageFilter());
    }
1308172
protected boolean allFiltersAreEmpty(Map<FilterableAttribute, Collection<String>> filters) {
        for (Map.Entry<FilterableAttribute, Collection<String>> filter : filters.entrySet()) {
            Collection<String> values = filter.getValue();
            if (values != null && !values.isEmpty()) {
                return false;
            }
        }
        return true;
    }
1366992
public AlertPolicyFilter where(Predicate<AlertPolicyMetadata> filter) {
        checkNotNull(filter, "Filter predicate must be not a null");

        this.predicate = this.predicate.and(filter);

        return this;
    }
193508
public static boolean matches(Pattern patternMatcher, Collection<Filter> filters, Extension extension)
    {
        if (matches(patternMatcher, extension.getId().getId(), extension.getDescription(), extension.getSummary(),
            extension.getName(), ExtensionIdConverter.toStringList(extension.getExtensionFeatures()))) {
            for (Filter filter : filters) {
                if (!matches(filter, extension)) {
                    return false;
                }
            }

            return true;
        }

        return false;
    }