This method removes all keys that match the given value
488201
private void findMatchingValues(NavigableMap<Endpoint, Integer> map, Endpoint endpoint, List<UUID> result) {
        // Mark this endpoint as a marker, because it is used to do a tailMap traversal to query matching edges
        endpoint.setMarker();
        
        // Find the first key 
        Endpoint floorKey = map.floorKey(endpoint);
        
        Map<Endpoint, Integer> view;
        if (floorKey == null) {
            // This means that the element being searched is the minimum
            view = map;
        } else {
            view = map.tailMap(floorKey);
        }
        
        boolean isFirst = true;
        for (Map.Entry<Endpoint, Integer> entry : view.entrySet()) {
            Endpoint key = entry.getKey();

            if (endpoint.isMatch(key)) {
                // Matching entry, must be added to result
                result.add(key.getEdgeId());
            } else {
                // Done with the search -- the tree map is sorted
                
                if (isFirst) {
                    // continue
                } else {
                    break;
                }
            }
            
            isFirst = false;
        }
    }
938938
def delete_(*keyname):
    '''
    
    '''
    mdata = _check_mdata_delete()
    valid_keynames = list_()
    ret = {}

    for k in keyname:
        if mdata and k in valid_keynames:
            cmd = '{0} {1}'.format(mdata, k)
            ret[k] = __salt__['cmd.run_all'](cmd, ignore_retcode=True)['retcode'] == 0
        else:
            ret[k] = True

    return ret
1158374
def remove_all_for(self, key):
        
        if not isinstance(key, _string_type):
            raise TypeError("Key need to be a string.")

        for idx in _range(self.__kcount[key]):
            super(VDFDict, self).__delitem__((idx, key))

        self.__omap = list(filter(lambda x: x[1] != key, self.__omap))

        del self.__kcount[key]
1236537
public V remove (K key) {
		int hashCode = key.hashCode();
		int index = hashCode & mask;
		if (key.equals(keyTable[index])) {
			keyTable[index] = null;
			V oldValue = valueTable[index];
			valueTable[index] = null;
			size--;
			return oldValue;
		}

		index = hash2(hashCode);
		if (key.equals(keyTable[index])) {
			keyTable[index] = null;
			V oldValue = valueTable[index];
			valueTable[index] = null;
			size--;
			return oldValue;
		}

		index = hash3(hashCode);
		if (key.equals(keyTable[index])) {
			keyTable[index] = null;
			V oldValue = valueTable[index];
			valueTable[index] = null;
			size--;
			return oldValue;
		}

		if (bigTable) {
			index = hash4(hashCode);
			if (key.equals(keyTable[index])) {
				keyTable[index] = null;
				V oldValue = valueTable[index];
				valueTable[index] = null;
				size--;
				return oldValue;
			}
		}

		return removeStash(key);
	}
833898
public boolean remove(K key, V value) {
		key = sanitizeKey(key);
		List<V> values = map.get(key);
		if (values == null) {
			return false;
		}

		boolean success = values.remove(value);
		if (values.isEmpty()) {
			map.remove(key);
		}
		return success;
	}
377176
def discard(self, value):
        """"""
        # Raise TypeError if value is not hashable
        hash(value)

        self.redis.srem(self.key, self._pickle(value))
568450
def remove_value(self, keys, value):
        
        self.count -= 1
        if not self.key:
            keys = self.__value_reverse_mapping[value]
            del self.__value_reverse_mapping[value]
        if len(keys) == 0:
            self.values.remove(value)
        else:
            key = keys[0]
            index = bisect.bisect_left(self.children, TreeNode(key, reversed=self.reversed))
            assert index != len(self.children) and self.children[index].key == key
            self.children[index].remove_value(keys[1:], value)
            if self.tree_node_updated:
                self.tree_node_updated(self.children[index])
            if self.children[index].count == 0:
                del self.children[index]
                if self.child_removed:
                    self.child_removed(self, index)
320978
public void removeByValue(Object value)
    {
        Object key = valueTable.remove(value);
        if (key != null)
        {
            keyTable.remove(key);
        }
    }
109732
public static <K, V> List<V> removeAllIfByKey(Map<K, V> map,
            Predicate<? super K> filter) {
        return map.keySet().stream().filter(filter).collect(toList())
                .stream().map(map::remove).collect(toList());
    }
148498
void cleanUpStaleEntries() {
        for (KeyedRef<K, V> ref = q.poll(); ref != null; ref = q.poll()) {
            map.remove(ref.getKey(), ref); // CONCURRENT remove() operation
        }
    }
1268256
def clean(self):
        
        for key, value in self.values.copy().items():
            if value is None:
                del self.values[key]
1265857
public V remove(K key) {
        final int hash = key.hashCode();
        final int row = hash / SIZE_ROW;
        final int column = hash & (SIZE_ROW - 1); // DON'T use the % operator as we
                                                  // need the result to be
                                                  // non-negative (-1%16 is -1 for
                                                  // example)
        final V rc = get(row, column);
        validateKey(hash);
        validateTable(row);
        this.values[row][column] = null;
        this.keys[hash] = null;
        return rc;
    }
20506
public boolean remove(V value) {
        // peek at what is in the map
        K key = value.getKey();
        Ref<V> ref = map.get(key);
        // only try to remove the mapping if it matches the provided class loader
        return (ref != null && ref.get() == value) ? map.remove(key, ref) : false;
    }
572937
private void removeKeys(List<Integer> keysToRemove, SparseArrayCompat<ViewHolder> headers) {
        for (Integer key : keysToRemove) {
            headers.remove(key);
        }
    }
625513
private void pruneMatches() {
		int index = 0;
		while( index < matches.size ) {
			AssociatedTripleIndex a = matches.get(index);
			// not matched. Remove it from the list by copying that last element over it
			if( a.c == -1 ) {
				a.set(matches.get(matches.size-1));
				matches.size--;
			} else {
				index++;
			}
		}
	}
1273999
public void replaceValues(String key, Object value) {
//    fields.replaceValues(key, Collections.singletonList(value)); // unnecessarily slow
    List<Object> list = fields.get(key);
    list.clear(); 
    list.add(value);
  }
821119
function() {
		canReflect.removeValues(this.replaceStateKeys, canReflect.toArray(arguments));
		canReflect.removeValues(this.replaceStateOnceKeys, canReflect.toArray(arguments));
	}