Apply a filter to the list of all tasks, and show the results.

@param project project file
@param filter filter
507843
private static void processTaskFilter(ProjectFile project, Filter filter)
   {
      for (Task task : project.getTasks())
      {
         if (filter.evaluate(task, null))
         {
            System.out.println(task.getID() + "," + task.getUniqueID() + "," + task.getName());
         }
      }
   }
917860
private function applyDataTableFilters()
    {
        $filters = $this->request->getFilters();

        foreach ($filters as $fieldName => $filterValue) {
            if (empty($filterValue)) {
                continue;
            }

            if (is_array($filterValue)) {
                $this->taskLogFilter->in($fieldName, $filterValue);
                continue;
            }

            $this->taskLogFilter->eq($fieldName, (string) $filterValue);
        }
    }
1184498
public function listTasks($project, $taskqueue, $optParams = array())
  {
    $params = array('project' => $project, 'taskqueue' => $taskqueue);
    $params = array_merge($params, $optParams);
    return $this->call('list', array($params), "Taskqueue_Tasks2");
  }
371154
public void setFilters(java.util.Collection<Filter> filters) {
        if (filters == null) {
            this.filters = null;
            return;
        }

        this.filters = new java.util.ArrayList<Filter>(filters);
    }
463756
private void listStatus(ArrayList<FileStatus> results, Path f,
      PathFilter filter) throws IOException {
    FileStatus listing[] = listStatus(f);
    if (listing == null) {
      throw new FileNotFoundException("File " + f + " does not exist");
    }
    for (int i = 0; i < listing.length; i++) {
      if (filter.accept(listing[i].getPath())) {
        results.add(listing[i]);
      }
    }
  }
324773
public void initFilter(FunDapterFilter<T> filter) {

        if (filter == null)
            throw new IllegalArgumentException("Cannot pass a null filter to FunDapter");

        this.funDapterFilter = filter;

        mFilter = new Filter() {

            @Override
            protected void publishResults(CharSequence constraint, FilterResults results) {

                @SuppressWarnings("unchecked") List<T> list = (List<T>) results.values;

                if (results.count == 0) {
                    resetData();
                } else {
                    mDataItems = list;
                }

                notifyDataSetChanged();
            }

            @Override
            protected FilterResults performFiltering(CharSequence constraint) {

                FilterResults results = new FilterResults();
                if (constraint == null || constraint.length() == 0) {

                    // No constraint - no point in filtering.
                    results.values = mOrigDataItems;
                    results.count = mOrigDataItems.size();
                } else {
                    // Perform the filtering operation

                    List<T> filter =
                            funDapterFilter.filter(constraint.toString(), mOrigDataItems);

                    results.count = filter.size();
                    results.values = filter;

                }

                return results;
            }
        };
    }
465672
public void useProject(String projectName) {
        removeProject(projectName);
        recentProjectsList.addFirst(projectName);
        while (recentProjectsList.size() > MAX_RECENT_FILES) {
            recentProjectsList.removeLast();
        }
    }
1075471
public void addAll(Collection<? extends M> collection) {
        if (collection != null) {
            items.addAll(collection);
            applyFilter();
        }
    }
131563
public void addFilter(final Filter newFilter) {
    if (headFilter == null) {
      headFilter = newFilter;
      tailFilter = newFilter;
    } else {
      tailFilter.next = newFilter;
      tailFilter = newFilter;
    }
  }
1027994
public static task_command_log[] get_filtered(nitro_service service, String filter) throws Exception
	{
		task_command_log obj = new task_command_log();
		options option = new options();
		option.set_filter(filter);
		task_command_log[] response = (task_command_log[]) obj.getfiltered(service, option);
		return response;
	}
629043
public void addFilter(final String columnFamily, Filter filter)
    {
        FilterList filterList = this.filters.get(columnFamily);
        if (filterList == null)
        {
            filterList = new FilterList();
        }
        if (filter != null)
        {
            filterList.addFilter(filter);
        }
        this.filters.put(columnFamily, filterList);
    }
1249145
private void decideTypeFilterToAdd(Filter filter) {
        Filter step = filter;

        if (Operator.MATCH == step.getRelation().getOperator() ||
                step.getRelation().getRightTerm() instanceof FunctionSelector) {
            if (matchList.isEmpty()) {
                matchList = new ArrayList<>();
            }
            matchList.add(filter);
        } else {
            if (filterList.isEmpty()) {
                filterList = new ArrayList<>();
            }
            filterList.add(filter);
        }
    }
1222071
public void addFilter(final WebAppFilter filter) {
		NullArgumentException.validateNotNull(filter, "Filter");
		NullArgumentException.validateNotNull(filter.getFilterName(),
				"Filter name");
		NullArgumentException.validateNotNull(filter.getFilterClass(),
				"Filter class");
		filters.put(filter.getFilterName(), filter);
		// add url patterns and servlet names for filter mappings added before
		// filter
		for (WebAppFilterMapping mapping : getFilterMappings(filter
				.getFilterName())) {
			if (mapping.getUrlPattern() != null
					&& mapping.getUrlPattern().trim().length() > 0) {
				filter.addUrlPattern(mapping.getUrlPattern());
			}
			if (mapping.getServletName() != null
					&& mapping.getServletName().trim().length() > 0) {
				filter.addServletName(mapping.getServletName());
			}
		}
	}
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;
    }
287305
public void addFilter(Filter filter) {
    filter.setInitialContext(initialContext);

    int minIndex = Integer.MAX_VALUE;
    String[] before = filter.before();
    for (int i = 0; i < before.length; i++) {
        String s = before[i];
        int index = index(activeFilters, s);
        if (index < minIndex) {
          minIndex = index;
        }
      }
      if (minIndex == Integer.MAX_VALUE) {
        // -1 is more usable for not-found than MAX_VALUE
        minIndex = -1;
      }

    if (contains(filter.before(), FIRST_IN_PIPE)) {
      activeFilters.add(0, filter);
    } else if (minIndex != -1) {
      activeFilters.add(minIndex, filter);
    } else {
      activeFilters.add(filter);
    }
  }
651183
public void updateFilter(String filter) {
    if (isInitialized) {
      LynxConfig lynxConfig = lynx.getConfig();
      lynxConfig.setFilter(filter);
      lynx.setConfig(lynxConfig);
      clearView();
      restartLynx();
    }
  }
984056
public void process(ProjectProperties properties, FilterContainer filters, FixedData fixedData, Var2Data varData)
   {
      int filterCount = fixedData.getItemCount();
      boolean[] criteriaType = new boolean[2];
      CriteriaReader criteriaReader = getCriteriaReader();

      for (int filterLoop = 0; filterLoop < filterCount; filterLoop++)
      {
         byte[] filterFixedData = fixedData.getByteArrayValue(filterLoop);
         if (filterFixedData == null || filterFixedData.length < 4)
         {
            continue;
         }

         Filter filter = new Filter();
         filter.setID(Integer.valueOf(MPPUtility.getInt(filterFixedData, 0)));
         filter.setName(MPPUtility.removeAmpersands(MPPUtility.getUnicodeString(filterFixedData, 4)));
         byte[] filterVarData = varData.getByteArray(filter.getID(), getVarDataType());
         if (filterVarData == null)
         {
            continue;
         }

         //System.out.println(ByteArrayHelper.hexdump(filterVarData, true, 16, ""));
         List<GenericCriteriaPrompt> prompts = new LinkedList<GenericCriteriaPrompt>();

         filter.setShowRelatedSummaryRows(MPPUtility.getByte(filterVarData, 4) != 0);
         filter.setCriteria(criteriaReader.process(properties, filterVarData, 0, -1, prompts, null, criteriaType));

         filter.setIsTaskFilter(criteriaType[0]);
         filter.setIsResourceFilter(criteriaType[1]);
         filter.setPrompts(prompts);

         filters.addFilter(filter);
         //System.out.println(filter);
      }
   }