What's the fastest way to sort a HashMap alphanumerically (on a key that's an array of ints)?
<pre><code>HashMap&lt;ArrayList&lt;Integer&gt;, String&gt;
</code></pre>

<p>Iterating though this structure, I get:</p>

<pre><code>[1 1 0], "gh"
[0 4 2], "gh"
[0 5 2], "qh"
</code></pre>

<p>However, I want to sort this on the key (in increasing order), to get</p>

<pre><code>[0 4 2], "gh"
[0 5 2], "qh"
[1 1 0], "gh"
</code></pre>

<p>The first component is sorted first, then the second, then the third.</p>
