Check if all the children in prevMap are present and identical in newMap.
Then, check if anything is in newMap that isn't in prevMap.
@param mapName
@param prevMap
@param newMap
506796
private void getCommandsToDiff(String mapName,
                                   CatalogMap<? extends CatalogType> prevMap,
                                   CatalogMap<? extends CatalogType> newMap)
    {
        assert(prevMap != null);
        assert(newMap != null);

        // in previous, not in new
        for (CatalogType prevType : prevMap) {
            String name = prevType.getTypeName();
            CatalogType newType = newMap.get(name);
            if (newType == null) {
                writeDeletion(prevType, newMap.m_parent, mapName);
                continue;
            }

            diffRecursively(prevType, newType);
        }

        // in new, not in previous
        for (CatalogType newType : newMap) {
            CatalogType prevType = prevMap.get(newType.getTypeName());
            if (prevType != null) continue;
            writeAddition(newType);
        }
    }
1219357
protected boolean valuesEqual(MapEntryValue oldValue, MapEntryValue newValue) {
    return (oldValue == null && newValue == null)
        || (oldValue != null && newValue != null && valuesEqual(oldValue.value(), newValue.value()));
  }
45042
public void setValuesForIn(String values, String name, Map<String, Object> map) {
        getMapHelper().setValuesForIn(values, name, map);
    }
77929
public void removeMember(String childName) {
        assert isMap() : "'removeMember' allowed only for MAP nodes";
        if (m_childNodeMap != null) {
            // Remove from child name map and then list if found.
            UNode removeNode = m_childNodeMap.remove(childName);
            if (removeNode != null) {
                m_children.remove(removeNode);
            }
        }
    }
1141386
public boolean addAllValues(MultiMap<V> map) {
        boolean merged = false;

        if ((map == null) || (map.isEmpty())) {
            // done
            return merged;
        }

        for (Map.Entry<String, List<V>> entry : map.entrySet()) {
            String name = entry.getKey();
            List<V> values = entry.getValue();

            if (this.containsKey(name)) {
                merged = true;
            }

            this.addValues(name, values);
        }

        return merged;
    }
701184
private void reusePreviouslyUsedVariableMap(SortedSet<Assignment> varsToRename) {
    // If prevUsedRenameMap had duplicate values then this pass would be
    // non-deterministic.
    // In such a case, the following will throw an IllegalArgumentException.
    checkNotNull(prevUsedRenameMap.getNewNameToOriginalNameMap());
    for (Assignment a : varsToRename) {
      String prevNewName = prevUsedRenameMap.lookupNewName(a.oldName);
      if (prevNewName == null || reservedNames.contains(prevNewName)) {
        continue;
      }

      if (a.isLocal
          || (!externNames.contains(a.oldName)
              && prevNewName.startsWith(prefix))) {
        reservedNames.add(prevNewName);
        finalizeNameAssignment(a, prevNewName);
      }
    }
  }
719098
public static SoyMap legacyObjectMapToMap(SoyLegacyObjectMap map) {
    Map<SoyValue, SoyValueProvider> newMap = new HashMap<>();
    for (SoyValue key : map.getItemKeys()) {
      newMap.put(key, map.getItemProvider(key));
    }
    return SoyMapImpl.forProviderMap(newMap);
  }
465281
void compareMapTypes(Schema oldSchema,
                                              Schema newSchema,
                                              List<Message> messages,
                                              String name) {
        if(oldSchema == null || newSchema == null || oldSchema.getType() != Schema.Type.MAP) {
            throw new IllegalArgumentException("Old schema must be MAP type. Name=" + name
                                               + ". Type=" + oldSchema);
        }

        if(newSchema.getType() != Schema.Type.MAP) {
            messages.add(new Message(Level.ERROR, "Illegal type change from " + oldSchema.getType()
                                                  + " to " + newSchema.getType() + " for field "
                                                  + name));
            return;
        }

        // Compare the array element types
        compareTypes(oldSchema.getValueType(),
                     newSchema.getValueType(),
                     messages,
                     name + ".<map element>");
    }
1093856
public static Map<String, String> copyMap(Map<String, String> originalMap) {
        Objects.requireNonNull(originalMap, Required.MAP.toString());
        
        return new HashMap<>(originalMap);
    }
390873
public void setMap(Map<String, Object> map) {
        eventMap.clear();
        eventMap.putAll(map);
    }
336019
public static final <K,V> MapList<K,V> unmodifiableMapList(MapList<K,V> map)
    {
        return new UnmodifiableMapList(Collections.unmodifiableMap(map), map.getComparator());
    }
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);
            }
        }
    }
625916
@Pure
	public static <K, V> LinkedHashMap<K, V> newLinkedHashMap() {
		return new LinkedHashMap<K, V>();
	}
1281449
@SuppressWarnings("unchecked")
	protected Map<String, Object> getNestedMap(Map<String, Object> map, String key) {
		Object value = map.get(key);
		if (value == null) {
			return Collections.emptyMap();
		}
		return (Map<String, Object>) value;
	}
56251
public static <K, V> Map<K, V> createLinkedHashMap(int expectedMapSize) {
        final int initialCapacity = calculateInitialCapacity(expectedMapSize);
        return new LinkedHashMap<K, V>(initialCapacity, HASHMAP_DEFAULT_LOAD_FACTOR);
    }
427179
public void setValueForIn(Object value, String name, Map<String, Object> map) {
        getMapHelper().setValueForIn(value, name, map);
    }
1357990
public static <K> Matcher<Map<? extends K, ?>> hasSameKeySet(final Map<? extends K, ?> comparisonMap) {
        return IsMapWithSameKeySet.hasSameKeySet(comparisonMap);
    }