Add this key and value to this (ldap) filter.
334031
public static String addToFilter(String filter, String key, String value)
    {
        if (value != null) 
        {
            String newFilter = "(" + key + "=" + value + ")";
            if ((filter == null) || (filter.length() == 0))
                filter = newFilter;
            else if ((filter.startsWith("(&")) && (filter.endsWith("")))
                filter = filter.substring(0, filter.length() - 1) + newFilter + ")";
            else
                filter = "(&" + filter + newFilter + ")";
        }
        return filter;
    }
97314
public function addFilter(Filter $filter)
    {
        $key = $filter->getKey();
        $this->filters[$key] = $filter;
    }
1327060
public function set($key, $value = null, $filter = null)
	{
		parent::set($key, $value);

		if (is_array($key))
		{
			if (is_bool($value))
			{
				$filter = $value;
			}

			foreach ($key as $_key => $_value)
			{
				$this->filterIndex[$_key] = $filter;
			}
		}
		else
		{
			$this->filterIndex[$key] = $filter;
		}

		return $this;
	}
252817
def add_if_not_none(cls, dict_, key, value):
        

        if value is not None:
            dict_[key] = str(value)
966592
def add(self, name, value):
        # type: (str, str) -> None
        """"""
        self._last_key = name
        if name in self:
            self._dict[name] = value
            self._as_list[name].append(value)
        else:
            self[name] = value
688240
def add(self, key, value,
            description='',
            history_max_size=None):
        """"""
        if key not in self.stats_history:
            self.stats_history[key] = GlancesAttribute(key,
                                                       description=description,
                                                       history_max_size=history_max_size)
        self.stats_history[key].value = value
1193999
def append(self, key, value=None, dir=False, ttl=None, timeout=None):
        """"""
        url = self.make_key_url(key)
        data = self.build_args({
            'value': (six.text_type, value),
            'dir': (bool, dir or None),
            'ttl': (int, ttl),
        })
        try:
            res = self.session.post(url, data=data, timeout=timeout)
        except:
            self.erred()
        return self.wrap_response(res)
134697
def put(self, key, value):
    '''
    '''
    key = self._service_key(key)
    self._service_ops['put'](key, value)
188294
def add(self, key, value=None):
        
        if value is None:
            value = 2 ** (len(self))

        self[key] = value
        setattr(self, key, self[key])
        return value
247504
def add2set(self, pid, key, value):
    """"""
    prop = self.property_entries[pid]

    current = prop.objects.get(key, None)
    current_local_key = prop.references.get(key, None)

    if current and current is not value:
        current.detach()

    if current_local_key is None:
        prop.references[key] = prop.next_free_key
        prop.next_free_key += 1

    prop.objects[key] = value

    if prop.parent.dir:
        ref = prop.index_ref_name(key)
        dir_entry = prop.parent.dir.get(ref)
        if dir_entry is None:
            dir_entry = prop.parent.dir.makedir(ref)
        if value.dir != dir_entry:
            value.attach(dir_entry)
        prop.mark_modified()
1337950
def add(self, key, val):
        
        key_lower = key.lower()
        new_vals = [key, val]
        # Keep the common case aka no item present as fast as possible
        vals = self._container.setdefault(key_lower, new_vals)
        if new_vals is not vals:
            vals.append(val)
1344133
@Override
    protected boolean filterAdd(HeaderKeys key, byte[] value) {
        boolean rc = super.filterAdd(key, value);

        if (HttpHeaderKeys.isWasPrivateHeader(key.getName())) {
            rc = isPrivateHeaderTrusted(key);
        }
        return rc;
    }
971278
def with_value(self, key, val):
        ''' 
        '''
        new_dict = dict(self._dict)
        new_dict[key] = val
        return AuthContext(new_dict)
958678
def add(self, key, value, key_length=0):
        
        if key_length < 1:
            key_length = len(key)
        val = self.add_method(self, key, key_length, value)
        if self.k:
            self._update(key, value)
        return val
323788
def add_query(self, key_val={}):
        

        q = Q("match", **key_val)
        self.search = self.search.query(q)
        return self
129560
def put(self, key, value):
    '''
    '''
    super(DirectoryTreeDatastore, self).put(key, value)

    str_key = str(key)

    # ignore root
    if str_key == '/':
      return

    # retrieve directory, to add entry
    dir_key = key.parent.instance('directory')
    directory = self.directory(dir_key)

    # ensure key is in directory
    if str_key not in directory:
      directory.append(str_key)
      super(DirectoryTreeDatastore, self).put(dir_key, directory)
348415
public function addAdditionalData(string $key, $value): self
    {
        $this->additionalData[$key] = $value;

        return $this;
    }