asMap-implementation for Java (based on Arrays.asList)
In my opinion MapBuilder should contain a Map, not extend one. Another possible design would be to use a single call with varargs:

public class MapUtil {
    public static &lt;K,V&gt; Map&lt;K,V&gt; asMap(Map.Entry&lt;K,V&gt;... entries) {
        Map&lt;K,V&gt; map = new HashMap&lt;K,V&gt;();
        for(Map.Entry&lt;K,V&gt; entry : entries) {
            map.put(entry.getKey(), entry.getValue());
        }
        return map;
    }

    public static &lt;K,V&gt; Map.Entry&lt;K,V&gt; e(final K k, final V v) {
        return new Map.Entry&lt;K, V&gt;() {
            public K getKey() {
                return k;
            }
            public V getValue() {
                return v;
            }
            public V setValue(V value) {
                throw new UnsupportedOperationException("Not supported");
            }
        };
    }
} 

import static very.useful.MapUtil.*;
... 
Map&lt;String, Integer&gt; map = asMap(e("x",1),e("y",2),e("z",3));