public static < K , V > Map < K , V > copyOf ( Map < K , V > map ) { Preconditions . checkNotNull ( map ) ; return ImmutableMap . < K , V > builder ( ) . putAll ( map ) . build ( ) ; }
Creates an immutable map . A copy of the given map is used . As a result it is safe to modify the source map afterwards .