package net.hamnaberg.json.util;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public final class MapOps {
    public static <K,V> Map<K,V> newHashMap() {
        return new HashMap<K, V>();
    }

    public static <K, V, V2> Map<K, V2> mapValues(Map<K, V> input, Function<V, V2> f) {
        Map<K, V2> map = MapOps.newHashMap();
        Set<Map.Entry<K,V>> entries = input.entrySet();
        for (Map.Entry<K, V> entry : entries) {
            map.put(entry.getKey(), f.apply(entry.getValue()));
        }
        return Collections.unmodifiableMap(map);
    }
}

@@ -247,16 +247,1271 @@
 %0A    %7D%0A%0A
+    public static %3CK,V%3E Map%3CK,V%3E newHashMap(Map%3CK, V%3E fromMap) %7B%0A        return new HashMap%3CK, V%3E(fromMap);%0A    %7D%0A%0A    public static %3CK,V%3E Map%3CK,V%3E newHashMap(K k1, V v1) %7B%0A        HashMap%3CK, V%3E hm = new HashMap%3CK, V%3E();%0A        hm.put(k1, v1);%0A        return hm;%0A    %7D%0A%0A    public static %3CK,V%3E Map%3CK,V%3E newHashMap(K k1, V v1, K k2, V v2) %7B%0A        HashMap%3CK, V%3E hm = new HashMap%3CK, V%3E();%0A        hm.put(k1, v1);%0A        hm.put(k2, v2);%0A        return hm;%0A    %7D%0A%0A    public static %3CK,V%3E Map%3CK,V%3E newHashMap(K k1, V v1, K k2, V v2, K k3, V v3) %7B%0A        HashMap%3CK, V%3E hm = new HashMap%3CK, V%3E();%0A        hm.put(k1, v1);%0A        hm.put(k2, v2);%0A        hm.put(k3, v3);%0A        return hm;%0A    %7D%0A%0A    public static %3CK,V%3E Map%3CK,V%3E newHashMap(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4) %7B%0A        HashMap%3CK, V%3E hm = new HashMap%3CK, V%3E();%0A        hm.put(k1, v1);%0A        hm.put(k2, v2);%0A        hm.put(k3, v3);%0A        hm.put(k4, v4);%0A        return hm;%0A    %7D%0A%0A    public static %3CK,V%3E Map%3CK,V%3E newHashMap(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5) %7B%0A        HashMap%3CK, V%3E hm = new HashMap%3CK, V%3E();%0A        hm.put(k1, v1);%0A        hm.put(k2, v2);%0A        hm.put(k3, v3);%0A        hm.put(k4, v4);%0A        hm.put(k5, v5);%0A        return hm;%0A    %7D%0A%0A
     publ

put v1 to v5