Add a Q-object to the current filter.
332244
def _add_q(self, q_object):
        """"""
        self._criteria = self._criteria._combine(q_object, q_object.connector)
885785
public void addFilter(Filter filter, Object value) {
        if (filter.getParameterClass().isInstance(value)) {
           parameters.put(filter.repr(), value);
        } else {
            String msg = "You need to supply the correct parameter for the " +
                    filter + " filter. Expecting a(n) " + filter.getParameterClass().getSimpleName();
            throw new FilterParameterException(msg);
        }
    }
1312777
private void addFilter(Filter filter) {
        boolean exists = false;
        for (Filter initedFilter : this.filters) {
            if (initedFilter.getClass() == filter.getClass()) {
                exists = true;
                break;
            }
        }

        if (!exists) {
            filter.init(this);
            this.filters.add(filter);
        }

    }
355121
def add_filter(self, entry):
        """"""
        entry = entry[10:-1]
        info = entry.split(',')
        if len(info) < 2:
            return False
        for v in info:
            key, value = v.split('=', 1)
            if key == 'ID':
                self.filter[value] = {}
                id_ = value
            elif key == 'Description':
                self.filter[id_]['description'] = value
                if len(info) > 2:
                    self.info[id_]['description'] += '; '.join(info[2:])
        return True
1248978
private void add(ClassFilter filter) {
        switch(operator) {
        case NOT:
            filters.add(new NegationClassFilter(filter));
            operator = Operator.NONE;
            break;
        case OR:
            filters.set(filters.size() - 1, 
                        new OrClassFilter(filters.get(filters.size() - 1), filter));
            operator = Operator.NONE;
            break;
        default:
            filters.add(filter);
            break;
        }
    }
983020
def eventFilter( self, object, event ):
        
        if ( event.type() == event.KeyPress ):
            if ( event.key() in (Qt.Key_Return, Qt.Key_Enter) ):
                self.addQuery()
                return True
        
        return False
576629
def add_filter(self, component, filter_group="pyxley-filter"):
        """"""
        if getattr(component, "name") != "Filter":
            raise Exception("Component is not an instance of Filter")
        if filter_group not in self.filters:
            self.filters[filter_group] = []
        self.filters[filter_group].append(component)
1372872
private void addIfAccept(Class<?> clazz) {
		if (null != clazz) {
			Filter<Class<?>> classFilter = this.classFilter;
			if (classFilter == null || classFilter.accept(clazz)) {
				this.classes.add(clazz);
			}
		}
	}
621781
def exclude(self, *args, **kwargs):
        
        if args or kwargs:
            self.q_filters = Q(self.q_filters & ~Q(*args, **kwargs))
        return self
1331472
public Filter add(String attribute, Operator op, Object value) {
        return add(new Predicate(attribute, op, value));
    }
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);
    }
  }
917369
function attach(filters, instance)
{
  Object.keys(filters).forEach(function(step)
  {
    filters[step].forEach(function(filter)
    {
      instance.use(step, filter);
    });
  });
}
1188411
def addFilter(self, field, value):
        
        if "<" not in value or ">" not in value or ".." not in value:
            value = ":" + value

        if self.__urlFilters:
            self.__urlFilters += "+" + field + str(quote(value))
        else:
            self.__urlFilters += field + str(quote(value))
1028182
def addFilter(self, layer_id, where=None, outFields="*"):
        
        import copy
        f = copy.deepcopy(self._filterTemplate)
        f['layerId'] = layer_id
        f['outFields'] = outFields
        if where is not None:
            f['where'] = where
        if f not in self._filter:
            self._filter.append(f)
342700
def object_filter(filter)
    raise ArgumentError, "object_filter expects an instance of SoftLayer::ObjectFilter" if filter.nil? || !filter.kind_of?(SoftLayer::ObjectFilter)

    # we create a new object in case the user wants to store off the
    # filter chain and reuse it later
    APIParameterFilter.new(self.target, @parameters.merge({:object_filter => filter}));
  end
675196
def edit_filter(self):
        """"""
        filters, valid = QInputDialog.getText(self, _('Edit filename filters'),
                                              _('Name filters:'),
                                              QLineEdit.Normal,
                                              ", ".join(self.name_filters))
        if valid:
            filters = [f.strip() for f in to_text_string(filters).split(',')]
            self.parent_widget.sig_option_changed.emit('name_filters', filters)
            self.set_name_filters(filters)
1233937
def apply(filter):
    
    def decorator(callable):
        return lambda *args, **kwargs: filter(callable(*args, **kwargs))
    return decorator