code: 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;
      }
docs: 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).