Enumerates the properties of a Map<T>, invoking a callback and returning the first truthy result.

@param map A map for which properties should be enumerated.
@param callback A callback to invoke for each property.
514765
function forEachProperty(map, callback) {
        var result;
        for (var key in map) {
            if (result = callback(map[key], key))
                break;
        }
        return result;
    }
574766
function(map) {
        this.drawn = false;
        if(this.strategies) {
            var strategy, i, len;
            for(i=0, len=this.strategies.length; i<len; i++) {
                strategy = this.strategies[i];
                if(strategy.autoActivate) {
                    strategy.deactivate();
                }
            }
        }
    }
607716
public static <K, V> Map<K, V> removeNulls(Map<K, V> map) {
        Map<K, V> result = new LinkedHashMap<>();
        map.forEach((k, v) -> {
            if (v != null) {
                result.put(k, v);
            }
        });
        return result;
    }
1093205
public void setBackingMap(final Map<String, Map<String, List<Object>>> backingMap) {
        if (backingMap == null) {
            this.backingMap = new HashMap<>();
            this.possibleUserAttributeNames = new HashSet<>();
        } else {
            this.backingMap = new LinkedHashMap<>(backingMap);
            this.initializePossibleAttributeNames();
        }
    }
28717
private static void initMap() {
    // Go through all the enum constants and build a map of
    // LayoutVersion <-> EnumSet of all supported features in that LayoutVersion
    for (Feature f : Feature.values()) {
      EnumSet<Feature> ancestorSet = map.get(f.ancestorLV);
      if (ancestorSet == null) {
        ancestorSet = EnumSet.noneOf(Feature.class); // Empty enum set
        map.put(f.ancestorLV, ancestorSet);
      }
      EnumSet<Feature> featureSet = EnumSet.copyOf(ancestorSet);
      featureSet.add(f);
      map.put(f.lv, featureSet);
    }
    
    // Special initialization for 0.20.203 and 0.20.204
    // to add Feature#DELEGATION_TOKEN
    specialInit(Feature.RESERVED_REL20_203.lv, Feature.DELEGATION_TOKEN);
    specialInit(Feature.RESERVED_REL20_204.lv, Feature.DELEGATION_TOKEN);
  }
617786
public void putAll(Map<String, ? extends Object> map) {
        if (map.size() > 0) {
            for (String key : map.keySet()) {
                if (VALID_KEY.matcher(key).matches() == false) {
                    throw new IllegalArgumentException("Invalid key for FlexiBean: " + key);
                }
            }
            if (data == Collections.EMPTY_MAP) {
                data = new LinkedHashMap<>(map);
            } else {
                data.putAll(map);
            }
        }
    }
1216775
def map(self, callback):
        
        if isinstance(self._items, dict):
            return Collection(list(map(callback, self._items.values())))

        return Collection(list(map(callback, self._items)))
219420
@Override
	public void formatMap(Map<Object,Object> map) throws FormatException
	{
		if (map == null || map.isEmpty())
			return;// nothing to process

		// format properties
		Object key = null;
		Object value = null;
		String text = null;

		for (Map.Entry<Object, Object> entry :map.entrySet())
		{
			key = entry.getKey();
			value = entry.getValue();

			if (!(value instanceof String))
				continue; // skip

			text = (String) value;

			// overwrite value with formatted version
			if (text.indexOf(getTemplatePrefix()) > -1)
				map.put(key, format(text, map));
		}

	}
1240147
public TrieBuilder<T> setAll(Map<String, T> map) {
        for (Entry<String, T> entry : map.entrySet()) {
            set(entry.getKey(), entry.getValue());
        }
        return this;
    }
390873
public void setMap(Map<String, Object> map) {
        eventMap.clear();
        eventMap.putAll(map);
    }
585009
function (callback) {
            var mapName;

            for (mapName in this.maps) {
                if (this.maps.hasOwnProperty(mapName)) {
                    callback.call(this, this.maps[mapName], mapName);
                }
            }
        }
525148
private static void setParams(Map<String, ?> map) {
        for (String name : map.keySet()) {
            setParam(name, map.get(name));
        }
    }
1013619
function (map) {
            var key;
            for (key in map) {
                if (map.hasOwnProperty(key)) {
                    this.addInstance(key, map[key]);
                }
            }
            return this;
        }
1101436
protected void fromFlatMap(Map<String, String> map) {

    for (Entry<String, String> entry : map.entrySet()) {
      SimpleConfigProperties child;
      child = (SimpleConfigProperties) getChild(entry.getKey(), true);
      child.value = entry.getValue();
    }
  }
473414
public static <K, V> MutableMap<V, K> reverseMapping(Map<K, V> map)
    {
        final MutableMap<V, K> reverseMap = UnifiedMap.newMap(map.size());
        MapIterate.forEachKeyValue(map, new Procedure2<K, V>()
        {
            public void value(K sourceKey, V sourceValue)
            {
                reverseMap.put(sourceValue, sourceKey);
            }
        });
        return reverseMap;
    }
1293047
private static void setValue(Map<String,String> map, String key, String value) {
		map.put(key,value);
	}
169826
function (map) {
        Object.keys(map).forEach(function (key) {
            if (!this.registry.hasOwnProperty(key)) {
                this.registry[key] = map[key];
            }
        }, this);
        return this;
    }