Is there any way to optimize Map of List?
<p>given the following code?</p>

<pre><code>final Map&lt;String, List&lt;E&gt;&gt; map = new HashMap&lt;String, List&lt;E&gt;&gt;();

List&lt;E&gt; list = map.get(mapKey);
if (list == null) {
    list = new ArrayList&lt;E&gt;();
    map.put(mapKey, list);
}
list.add(value);
</code></pre>

<p>If there any way I can avoid the null check? But let the Map automatically create the List for me for my first time insertion?</p>

<p>I remember I once saw a specialized Map which is able to do this. However, I forget where I saw already :(</p>
