Java Comparator alphanumeric strings
<p>I want to implement my custom Comparator to sort a map of keys in this particular way:</p>

<pre><code>1
2
3
4
4a
4b
5
6
11
12
12a
...
</code></pre>

<p>And I dont know how can do it exactly. I have impelemented this only for numeric values:</p>

<pre><code>aaa = new TreeMap&lt;String, ArrayList&lt;ETrack&gt;&gt;(
    new Comparator&lt;String&gt;()
    {
      @Override
      public int compare(String s1, String s2)
      {
        return Integer.valueOf(s1).compareTo(Integer.valueOf(s2));
      }
    });
</code></pre>

<p>But this is not obiouslly the complete solution. Any idea?</p>