Returns all resources which match the supplied set of FilterPredicate objects.
971143
public Collection<RepositoryResource> getMatchingResources(final FilterPredicate... predicates) throws RepositoryBackendException {
        Collection<RepositoryResource> resources = cycleThroughRepositories(new RepositoryInvoker<RepositoryResource>() {
            @Override
            public Collection<RepositoryResource> performActionOnRepository(RepositoryConnection connection) throws RepositoryBackendException {
                return connection.getMatchingResources(predicates);
            }
        });
        return resources;
    }
1373628
private Map<String,Boolean> getFilters()
    {
        Map<String,Boolean> filters= new HashMap<String, Boolean>(2);
        //Site filter
        filters.put(SITES_FILTER, this.sites!=null && this.sites.size() > 0);
        //Properties filter
        filters.put(PROPERTIES_FILTER, this.properties!=null && this.properties.size() > 0);
        
        return filters;
    }
341461
public static Collection<MatchedMethod> filterByClosestParams(
            final Collection<MatchedMethod> possibilities, final int paramsCount) {
        Collection<MatchedMethod> res = null;
        for (int i = 0; i < paramsCount; i++) {
            final Collection<MatchedMethod> filtered = filterByParam(possibilities, i);
            if (res != null) {
                if (filtered.size() < res.size()) {
                    res = filtered;
                }
            } else {
                res = filtered;
            }
        }
        return res;
    }
608441
def get_joined_filters(self, filters):
        
        retfilters = Filters(self.filter_converter, self.datamodel)
        retfilters.filters = self.filters + filters.filters
        retfilters.values = self.values + filters.values
        return retfilters
829315
def filter(self, search):
        
        if not self._filters:
            return search

        post_filter = MatchAll()
        for f in itervalues(self._filters):
            post_filter &= f
        return search.post_filter(post_filter)
750964
public <T> List<Class<? extends T>> getImplementations(final Class<T> clazz, Predicate<Class<? extends T>> predicate)
	{
		final long started = System.currentTimeMillis();
		try
		{
			if (clazz.isInterface())
				return filter(finder.findImplementations(clazz), predicate);
			else
				return filter(finder.findSubclasses(clazz), predicate);
		}
		finally
		{
			final long finished = System.currentTimeMillis();
			searchTime.addAndGet(finished - started);

			if (log.isTraceEnabled())
				log.trace("getExtendingClasses " +
				          clazz +
				          " with predicate=" +
				          predicate +
				          " returned in " +
				          (finished - started) +
				          " ms");
		}
	}
913235
public static filteraction[] get(nitro_service service) throws Exception{
		filteraction obj = new filteraction();
		filteraction[] response = (filteraction[])obj.get_resources(service);
		return response;
	}
1029425
private function getFiltersParameters(bool $v3, string $resourceClass, string $operationName, ResourceMetadata $resourceMetadata, \ArrayObject $definitions, array $serializerContext = null): array
    {
        if (null === $this->filterLocator) {
            return [];
        }

        $parameters = [];
        $resourceFilters = $resourceMetadata->getCollectionOperationAttribute($operationName, 'filters', [], true);
        foreach ($resourceFilters as $filterId) {
            if (!$filter = $this->getFilter($filterId)) {
                continue;
            }

            foreach ($filter->getDescription($resourceClass) as $name => $data) {
                $parameter = [
                    'name' => $name,
                    'in' => 'query',
                    'required' => $data['required'],
                ];

                $type = $this->getType($v3, $data['type'], $data['is_collection'] ?? false, null, null, $definitions, $serializerContext);
                $v3 ? $parameter['schema'] = $type : $parameter += $type;

                if ('array' === $type['type'] ?? '') {
                    $deepObject = \in_array($data['type'], [Type::BUILTIN_TYPE_ARRAY, Type::BUILTIN_TYPE_OBJECT], true);

                    if ($v3) {
                        $parameter['style'] = $deepObject ? 'deepObject' : 'form';
                        $parameter['explode'] = true;
                    } else {
                        $parameter['collectionFormat'] = $deepObject ? 'csv' : 'multi';
                    }
                }

                $key = $v3 ? 'openapi' : 'swagger';
                if (isset($data[$key])) {
                    $parameter = $data[$key] + $parameter;
                }

                $parameters[] = $parameter;
            }
        }

        return $parameters;
    }
1170935
private HashSet<Resource> getResources(GeneratorContext context, JClassType userType, FileFilter filter) {
    Map<String, Resource> map = context.getResourcesOracle().getResourceMap();
    final String pack = userType.getPackage().getName().replace('.', '/');
   
    HashSet<Resource> resourceList = new HashSet<Resource>();
    for (Entry<String, Resource> entry : map.entrySet()) {
      String path = entry.getKey();
      if (!path.startsWith(pack))
        continue;
      String ext = getExtension(path);
      if (EXTENSION_MAP.containsKey(ext))
        resourceList.add(entry.getValue());
    }

    return resourceList;
  }
1197856
public <E extends Exception> boolean allMatch(Try.LongPredicate<E> filter) throws E {
        return allMatch(0, size(), filter);
    }
1197017
def filters(self):
        
        objects = javabridge.get_env().get_object_array_elements(
            javabridge.call(self.jobject, "getFilters", "()[Lweka/filters/Filter;"))
        result = []
        for obj in objects:
            result.append(Filter(jobject=obj))
        return result
701771
@CheckReturnValue
  public final FluentIterable<E> filter(Predicate<? super E> predicate) {
    return from(Iterables.filter(iterable, predicate));
  }
887557
function filter(p) {
          if (filters.length === 0)
            return true
          let predicate = false
          filters.forEach(section=> {
            let current = path.join('src', section)
            if (p.startsWith(current)) {
              predicate = true
            }
          })
          return predicate
        }
117714
def findItems( self, cls ):
        
        return filter(lambda x: isinstance(x, cls), self.items())
866193
def lookups(self):
        ""
        for filter in self._filters:
            yield filter.key, filter.display, filter.no_argument
248352
@Override
    public Iterable<T> findAll(EntityFilter<T> filter) {
        List<T> results = new ArrayList<>();
        for (T object : findAll()) {
            if (filter.accept(object)) {
                results.add(object);
            }
        }
        return results;
    }
1320700
public List<URL> scan(Predicate<String> filter)
    {
        List<URL> discoveredURLs = new ArrayList<>(128);

        // For each Forge addon...
        for (Addon addon : furnace.getAddonRegistry().getAddons(AddonFilters.allStarted()))
        {
            List<String> filteredResourcePaths = filterAddonResources(addon, filter);
            for (String filePath : filteredResourcePaths)
            {
                URL ruleFile = addon.getClassLoader().getResource(filePath);
                if (ruleFile != null)
                    discoveredURLs.add(ruleFile);
            }
        }
        return discoveredURLs;
    }