Fails if the map does not contain exactly the given set of key/value pairs.

<p><b>Warning:</b> the use of varargs means that we cannot guarantee an equal number of
key/value pairs at compile time. Please make sure you provide varargs in key/value pairs!
424280
@CanIgnoreReturnValue
  public Ordered containsExactly(@NullableDecl Object k0, @NullableDecl Object v0, Object... rest) {
    return delegate().containsExactly(k0, v0, rest);
  }
1289202
public final boolean hasTag(String key, Set<String> values) {
        return values.contains(getTag(key, ""));
    }
858156
public static boolean mapContainsKeys(Map<?, ?> _map, Object... _keys) {
        if (_map == null) {
            return false;
        } else if (_keys == null) {
            return true;
        }
        for (Object key : _keys) {
            if (key != null && !_map.containsKey(key)) {
                return false;
            }
        }
        return true;
    }
430496
static <K, V> Map<K, V> keyValuesToMap(Iterator<KeyValue<K, V>> keyValues) {
        Map<K, V> map = new HashMap<>();
        keyValues.forEachRemaining(pair -> map.put(pair.getKey(), pair.getValue()));
        return map;
    }
389602
@Override
	public boolean containsKey(final Object key) {
		lock.readLock().lock();
		try {
			if (isKeyValid(key)) {
				final boolean useLocalPrefixes = !mixDefaultAndLocalPrefixes && hasLocalPrefixConfigurations();
				if (!properties.containsKey(getPrefixedKey(key, useLocalPrefixes))) {
					return properties.containsKey(key);
				} else {
					return true;
				}
			}
			return false;
		} finally {
			lock.readLock().unlock();
		}
	}
1234488
private void assertApplicable( FunctionInputDef inputDef, VarNamePattern varNamePattern) throws IllegalArgumentException
    {
    if( !varNamePattern.isApplicable( inputDef))
      {
      throw new IllegalArgumentException( "Can't find variable matching pattern=" + varNamePattern);
      }
    }
1362032
function(map, key, value) {

    var list = [];

    if (map.has(key)) {

      list = map.get(key);

      if (!list) {
        list = [];
      }


    }
    list.push(value);
    map.set(key, list);

}
276732
private static boolean matches(String value, String component, Map<String, String> variableMap) {
        if (Utils.isEmpty(component)) {
            return Utils.isEmpty(value);
        }
        if (component.charAt(0) == '{') {
            // The component is a variable, so it always matches.
            if (!Utils.isEmpty(value)) {
                String varName = getVariableName(component);
                variableMap.put(varName, value);
            }
            return true;
        }
        return component.equals(value);
    }
163208
public static <K, V> Map<K, V> toMap(Iterable<K> keys, Iterable<V> values) {
		return toMap(keys, values, false);
	}
1210905
@SafeVarargs
    public static <T> Map<T, T> createMap(T... _args) {
        Map<T, T> map = new HashMap<>();
        if (_args != null) {
            if (_args.length % 2 != 0) {
                throw new IllegalArgumentException("Even number of parameters required to create map: " + Arrays.toString(_args));
            }
            for (int i = 0; i < _args.length;) {
                map.put(_args[i], _args[i + 1]);
                i += 2;
            }
        }
        return map;
    }
590909
public boolean containsWarns(
      java.lang.String key) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    return internalGetWarns().getMap().containsKey(key);
  }
688852
public static <K, V> void putListMult(Map<K, List<V>> map, K key,
            Collection<? extends V> values) {
        for (V value : values) {
            putList(map, key, value);
        }
    }
678001
@SuppressWarnings("unchecked") // worse case should be a ClassCastException
  /*
   * TODO(cpovirk): Consider requiring key to be a K here. But AtomicLongMapSubject isn't currently
   * parameterized, and if we're going to add a type parameter, I'd rather wait until after we
   * (hopefully) remove the other existing type parameters.
   */
  public void containsEntry(Object key, long value) {
    checkNotNull(key, "AtomicLongMap does not support null keys");
    long actualValue = ((AtomicLongMap<Object>) actual()).get(key);
    if (actualValue != value) {
      failWithActual("expected to contain entry", immutableEntry(key, value));
    }
  }
615784
public static <K, V> ImmutableMap<K, V> mapFromPairedKeyValueSequences(
      final Iterable<K> keys, final Iterable<V> values) {
    final ImmutableMap.Builder<K, V> builder = ImmutableMap.builder();
    for (final ZipPair<K, V> pair : zip(keys, values)) {
      builder.put(pair.first(), pair.second());
    }
    return builder.build();
  }
997079
public static <KType, VType> KTypeVTypeHashMap<KType, VType> from(KType[] keys, VType[] values) {
    if (keys.length != values.length) {
      throw new IllegalArgumentException("Arrays of keys and values must have an identical length.");
    }

    KTypeVTypeHashMap<KType, VType> map = new KTypeVTypeHashMap<>(keys.length);
    for (int i = 0; i < keys.length; i++) {
      map.put(keys[i], values[i]);
    }

    return map;
  }
1276754
public void containsEntry(@NullableDecl Object key, @NullableDecl Object value) {
    // TODO(kak): Can we share any of this logic w/ MapSubject.containsEntry()?
    if (!actual().containsEntry(key, value)) {
      Entry<Object, Object> entry = Maps.immutableEntry(key, value);
      List<Entry<Object, Object>> entryList = ImmutableList.of(entry);
      if (hasMatchingToStringPair(actual().entries(), entryList)) {
        failWithoutActual(
            simpleFact(
                lenientFormat(
                    "Not true that %s contains entry <%s (%s)>. However, it does contain entries "
                        + "<%s>",
                    actualAsString(),
                    entry,
                    objectToTypeName(entry),
                    countDuplicatesAndAddTypeInfo(
                        retainMatchingToString(
                            actual().entries(), entryList /* itemsToCheck */)))));
      } else if (actual().containsKey(key)) {
        failWithoutActual(
            simpleFact(
                lenientFormat(
                    "Not true that %s contains entry <%s>. However, it has a mapping from <%s> to "
                        + "<%s>",
                    actualAsString(), entry, key, actual().asMap().get(key))));
      } else if (actual().containsValue(value)) {
        Set<Object> keys = new LinkedHashSet<>();
        for (Entry<?, ?> actualEntry : actual().entries()) {
          if (Objects.equal(actualEntry.getValue(), value)) {
            keys.add(actualEntry.getKey());
          }
        }
        failWithoutActual(
            simpleFact(
                lenientFormat(
                    "Not true that %s contains entry <%s>. "
                        + "However, the following keys are mapped to <%s>: %s",
                    actualAsString(), entry, value, keys)));
      } else {
        failWithActual("expected to contain entry", Maps.immutableEntry(key, value));
      }
    }
  }
930695
private Map<String, Object> handleArgDefine(final String arg, final Deque<String> args) {
        /*
         * Interestingly enough, we get to here when a user uses -Dname=value.
         * However, in some cases, the OS goes ahead and parses this out to args
         * {"-Dname", "value"} so instead of parsing on "=", we just make the
         * "-D" characters go away and skip one argument forward.
         *
         * I don't know how to predict when the JDK is going to help or not, so
         * we simply look for the equals sign.
         */
        final Map.Entry<String, String> entry = parse(arg.substring(2), args);
        if (entry.getValue() == null) {
            throw new BuildException("Missing value for property " + entry.getKey());
        }

        if (RESERVED_PROPERTIES.containsKey(entry.getKey())) {
            throw new BuildException("Property " + entry.getKey() + " cannot be set with -D, use " + RESERVED_PROPERTIES.get(entry.getKey()) + " instead");
        }
        return ImmutableMap.of(entry.getKey(), entry.getValue());
    }