asMap-implementation for Java (based on Arrays.asList) I am always tired of the very verbose syntax in Java for creating small maps. Arrays.asList(T... a) is very convenient, and therefore I want something similar for a map.

public class MapUtils {
    public static &lt;K, V&gt; MapBuilder&lt;K, V&gt; asMap(K key, V value) {
        return new MapBuilder&lt;K, V&gt;().entry(key, value);
    }

    public static class MapBuilder&lt;K, V&gt; extends HashMap&lt;K, V&gt; {
        public MapBuilder&lt;K, V&gt; entry(K key, V value) {
            this.put(key, value);
            return this;
        }
    }
}

/* Example of how to use asMap */
public class Example {
    public void example() {
        Map&lt;String, String&gt; map = MapUtil.asMap("key", "value").entry("key2", "value2");
    }
}

/* Example of how the one way to create an inline Map in Java */
public class Before {
    public void before() {
        Map&lt;String, String&gt; map = new HashMap&lt;String, String&gt;() {{
            put("key", value");
            put("key2", value2");
        }};
    }
} 


Any inputs on how to improve this implementation of MapUtils? Do you consider the asMap function a good idea, or am I too lazy to write some extra characters?
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));