The collectionRejectFilter rejects a certain collection.
420412
public static <E> Filter<E> collectionRejectFilter(E[] objs) {
    return new CollectionAcceptFilter<E>(Arrays.asList(objs), false);
  }
1046663
function collectionFind(filter, options) {
        if (!filter) {
            // TODO - limit of ten by
            return collections[ this['_collection'] ]
        }

        if ( typeof(filter) !== 'object' ) { // == findAll
            throw new Error('filter must be an object');
        } else {
            //console.log('search into ', this['_collection'], collections[ this['_collection'] ], collections);
            var content             = collections[ this['_collection'] ]
                , condition         = filter.count()
                , i                 = 0
                , found             = []
                , localeLowerCase   = '';

            for (var o in content) {
                for (var f in filter) {
                    localeLowerCase = ( typeof(filter[f]) != 'boolean' ) ? filter[f].toLocaleLowerCase() : filter[f];
                    if ( filter[f] && keywords.indexOf(localeLowerCase) > -1 && localeLowerCase == 'not null' && typeof(content[o][f]) != 'undefined' && typeof(content[o][f]) !== 'object' && content[o][f] != 'null' && content[o][f] != 'undefined' ) {
                        if (found.indexOf(content[o][f]) < 0 ) {
                            found[i] = content[o][f];
                            ++i
                        }

                    } else if ( typeof(content[o][f]) != 'undefined' && typeof(content[o][f]) !== 'object' && content[o][f] === filter[f] ) {
                        found[i] = content[o];
                        ++i
                    }
                }
            }
        }

        return found
    }
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;
    }
474933
async def filter(self, request):
        """"""
        collection = self.collection
        self.filter_form.process(request.query)
        data = self.filter_form.data
        self.filter_form.active = any(o and o is not DEFAULT for o in data.values())
        for flt in self.columns_filters:
            try:
                collection = flt.apply(collection, data)
            # Invalid filter value
            except ValueError:
                continue
        return collection
301919
def reject(&block)
      current = get_current
      ilist = self.class.new
      a = @images.reject(&block)
      a.each { |image| ilist << image }
      ilist.set_current current
      ilist
    end
561338
public function filterModelCollectionAsContainer(Collection $collection)
    {
        parent::filterModelCollectionAsContainer($collection);

        $collection->filter(new Equals("Accepted", false));
    }
406114
private function removeEmptyRowsFromCollection()
    {
        $this->collection = $this->collection->reject(function ($data) {
            if (empty($data)) {
                return true;
            } else {
                return false;
            }
        });
    }
78218
public static <T> Collection<T> filter(Collection<T> data, Filter<T> filter) {
        if (!Utils.isEmpty(data)) {
            Iterator<T> iterator = data.iterator();
            while (iterator.hasNext()) {
                T item = iterator.next();
                if (!filter.accept(item)) {
                    iterator.remove();
                }
            }
        }
        return data;
    }
983372
def reject(self, func):
        
        return self._wrap(list(filter(lambda val: not func(val), self.obj)))
1325983
def filter_collections(self, model, context=None):
        
        if model is None:
            return

        for property_name in self.collections:
            prop = self.collections[property_name]
            collection = self.get(model, property_name)
            filtered_value = prop.filter(
                value=collection,
                model=model,
                context=context
            )
            self.set(model, property_name, filtered_value)

            prop.filter_with_schema(
                collection,
                context if prop.use_context else None
            )
701049
public static <T> Matcher<T> isNotIn(Collection<T> collection) {
        return not(isIn(collection));
    }
681828
protected void handleCollectionTypeNotAvailable(XCollectionLiteral literal, ITypeComputationState state, Class<?> clazz) {
		for(XExpression element: literal.getElements()) {
			state.withNonVoidExpectation().computeTypes(element);
		}
		state.acceptActualType(state.getReferenceOwner().newUnknownTypeReference(clazz.getName()));
	}
1012083
def validate_collections(self, model, context=None):
        
        result = Result()
        for property_name in self.collections:
            prop = self.collections[property_name]
            collection = self.get(model, property_name)

            errors = prop.validate(
                value=collection,
                model=model,
                context=context
            )
            if len(errors):
                result.add_collection_errors(
                    property_name=property_name,
                    direct_errors=errors
                )

            collection_errors = prop.validate_with_schema(
                collection=collection,
                context=context
            )

            result.add_collection_errors(
                property_name=property_name,
                collection_errors=collection_errors
            )

        return result
414434
def filter(self, data, collection, **kwargs):
        """"""
        if not data or self.filters is None:
            return None, collection

        filters = {}
        for f in self.filters:
            if f.name not in data:
                continue
            ops, collection = f.filter(collection, data, **kwargs)
            filters[f.name] = ops

        return filters, collection
328091
function validate (uri, collection, cb) {
  if ('function' != typeof cb) {
    throw new TypeError('cb must be a function');
  }

  if ('string' != typeof collection) {
    throw new TypeError('collection must be a string');
  }

  if ('string' != typeof uri) {
    throw new TypeError('uri must be a string');
  }
}
109446
<T extends Validatable> void validateCollection(final Collection<T> collection,
                                                  final String name) {
    Iterator<T> iterator = collection.iterator();
    int i = 0;
    while (iterator.hasNext()) {
      try {
        iterator.next().validate();
      } catch (final IllegalArgumentException e) {
        throw new IllegalArgumentException("Invalid " + name + 
            " at index " + i, e);
      }
      i++;
    }
  }
88843
private static void validateAsMongoDBCollectionName(String collectionName) {
		Contracts.assertStringParameterNotEmpty( collectionName, "requestedName" );
		//Yes it has some strange requirements.
		if ( collectionName.startsWith( "system." ) ) {
			throw log.collectionNameHasInvalidSystemPrefix( collectionName );
		}
		else if ( collectionName.contains( "\u0000" ) ) {
			throw log.collectionNameContainsNULCharacter( collectionName );
		}
		else if ( collectionName.contains( "$" ) ) {
			throw log.collectionNameContainsDollarCharacter( collectionName );
		}
	}