How can I create a sorted list of integer and string pairs?
<p>How can I create a list (or some other type of container) of integer and strings pairs that allows duplicates in both pairs and can be sorted by the integer value?</p>

<p>I need to fill a container with names (string) and scoring (integer) pairs, the container must allow duplicated values in both name and scoring, and i need to sort this list by the scoring value.</p>

<p>I tried with a SortedMap but doesn't allow duplicated values:</p>

<pre><code>SortedMap&lt;Integer,String&gt; sm=new TreeMap&lt;Integer, String&gt;();

sm.put(23, "Peter");  
sm.put(11, "Tony");  
sm.put(110, "Claire");  
sm.put(13, "ferca");  
sm.put(55, "Julian");  
sm.put(13, "Pedro");  
</code></pre>

<p>In this example, ferca and Pedro have the same scoring value, this is something I need to allow, but the SortedMap overwrites "ferca" with "Pedro".</p>

<p>What is the best container type to do this?</p>
