/*
Documented, #filter
504416
public static <E> List<E> filter(final Iterable<E> iterable, final Predicate<E> pred) {
        final List<E> filtered = newArrayList();
        for (E element : iterable) {
            if (pred.test(element)) {
                filtered.add(element);
            }
        }
        return filtered;
    }
422424
public void filterTable(String filter) {

        m_container.removeAllContainerFilters();
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(filter)) {
            m_container.addContainerFilter(
                new Or(
                    new SimpleStringFilter(PROP_NAME, filter, true, false),
                    new SimpleStringFilter(PROP_DESCRIPTION, filter, true, false)));
        }
        if ((getValue() != null) & !((Set<CmsUUID>)getValue()).isEmpty()) {
            setCurrentPageFirstItemId(((Set<CmsUUID>)getValue()).iterator().next());
        }
    }
1224211
@Override
    public void doFilter(ResourceRequest request, ResourceResponse response, FilterChain chain) throws IOException,
            PortletException {
        doCommonFilter(request, response, chain);
    }
292461
@CheckResult
    @NonNull
    public final Data<T> filter(@NonNull Predicate<? super T> predicate) {
        return new FilterData<>(this, predicate);
    }
1154571
function(filter) {
        var result = [];
        for (var i in this.proto) {
            if (typeof (this.proto[i]) === 'function' && JOII.Compat.indexOf(JOII.InternalPropertyNames, i) === -1) {
                result.push(new JOII.Reflection.Method(this, i));
            }
        }
        return result;
    }
996482
function (set, excepts, onlys) {
    debug("~ #filterOut");
    var hasExcepts = excepts && excepts.length > 0;
    if (onlys) {
        if (hasExcepts) {
            return onlys.filter(function (oel){
                return !excepts.some(function (eel) { return eel === oel;});
            });
        } else {
            return onlys;
        }
    }
    if (hasExcepts) {
        return set.filter(function (oel){
            return !excepts.some(function (eel) { return eel === oel;});
        });
    } else {
        return set;
    }
}
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;
    }
796753
function filter(callback) {
        var filteredMatches = [];

        each(function (match, i) {
          if (callback(match, i)) {
            filteredMatches.push(match);
          }
        });

        matches = filteredMatches;

        /*jshint validthis:true*/
        return this;
      }
105792
@Override
    public ListT<W,T> filter(final Predicate<? super T> test) {
        return of(run.map(seq -> seq.filter(test)));
    }
232980
public static <T> List<T> filter(final Iterable<T> unfiltered, final Predicate<T> filter) {
        return newArrayList(Iterables.filter(unfiltered, filter));
    }
1347037
function filterGenerator(filter) {
	if(typeof filter === "boolean")
		return () => filter;

	if(typeof filter === "function")
		return filter;

	if(filter instanceof RegExp)
		return input => filter.test(input);

	if(filter instanceof Set)
		return input => filter.has(input);

	if(filter instanceof Map)
		return input => !!filter.get(input);

	if(Array.isArray(filter))
		return input => filter.indexOf(input) !== -1;

	if(filter && typeof filter === "object")
		return input => !!filter[input];

	throw new TypeError("Invalid filter type.");
}
252342
public static Map<String,Map<String, String>> parseFilter(String filter) {
        return parseFilter(filter, true, DEFAULT_FILTER_KEY);
    }
1227105
@Override
  public Streamlet<R> filter(SerializablePredicate<R> filterFn) {
    checkNotNull(filterFn, "filterFn cannot be null");

    FilterStreamlet<R> retval = new FilterStreamlet<>(this, filterFn);
    addChild(retval);
    return retval;
  }
56073
def _where(self, filter_fn):
        '''  '''
        assert callable(filter_fn), 'filter_fn needs to be callable'
        return VList(i for i in self if filter_fn(i()))
950759
function filter(fp, opts) {
  if (opts && opts.filter) {
    return opts.filter(fp, opts);
  }
  return /[^x]\.js$/.test(fp);
}
731179
function filter(predicate, thisArg) {
    return function filterOperatorFunction(source) {
        return source.lift(new FilterOperator(predicate, thisArg));
    };
}
638146
function(filter){
        var filterKeys = Object.keys(filter), removeData = [], groupData = [], _this = this;
        if(filterKeys.length == 0){
            //clear all
            this._dataCache.length = 0;
        }else if(filterKeys.length == 1 && filterKeys[0] == 'group'){
            //remove group
            removeData = this._groupFilter(filter);
            removeData.forEach(function(item){
                var index = _this._dataCache.indexOf(item);
                _this._dataCache.splice(index, 1);
            });
        }else{
            if(filter.group == undefined){
                filter.group = 'root';
            }
            if(filter.ip !== undefined){
                filter.type = 'ip'
            }else if(filter.text !== undefined){
                filter.type = 'text'
            }
            removeData =  this._filter(filter);
            if(filter.group != 'root'){
                groupData = this._groupFilter(filter);
            }else{
                groupData.push({value : this._dataCache});
            }
            groupData.forEach(function(group){
                removeData.forEach(function(item){
                    var index = group.value.indexOf(item);
                    if(index != -1){
                        group.value.splice(index, 1);
                    }
                });
            });
        }

        return this;
    }