android/guava/src/com/google/common/collect/Maps.java
public static <K, V> HashMap<K, V> newHashMap(Map<? extends K, ? extends V> map) {
    return new HashMap<>(map);
  }
public static <K, V> HashMap<K, V> newHashMap(Map<? extends K, ? extends V> map) {
    return new HashMap<>(map);
  }
Creates a <i>mutable</i> {@code HashMap} instance with the same mappings as the specified map.

<p><b>Note:</b> if mutability is not required, use {@link ImmutableMap#copyOf(Map)} instead.

<p><b>Note:</b> if {@code K} is an {@link Enum} type, use {@link #newEnumMap} instead.

<p><b>Note for Java 7 and later:</b> this method is now unnecessary and should be treated as
deprecated. Instead, use the {@code HashMap} constructor directly, taking advantage of the new
<a href="http://goo.gl/iz2Wi">"diamond" syntax</a>.

@param map the mappings to be placed in the new map
@return a new {@code HashMap} initialized with the mappings from {@code map}