android/guava/src/com/google/common/collect/Maps.java
public static <K extends Enum<K>, V> EnumMap<K, V> newEnumMap(Map<K, ? extends V> map) {
    return new EnumMap<>(map);
  }
public static <K extends Enum<K>, V> EnumMap<K, V> newEnumMap(Map<K, ? extends V> map) {
    return new EnumMap<>(map);
  }
Creates an {@code EnumMap} with the same mappings as the specified map.

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

@param map the map from which to initialize this {@code EnumMap}
@return a new {@code EnumMap} initialized with the mappings from {@code map}
@throws IllegalArgumentException if {@code m} is not an {@code EnumMap} instance and contains
no mappings