title: Trying to sort a HashMap<String, List<String>> by list item
body: <p>I have a <code>HashMap&lt;String, List&lt;String&gt;&gt;</code> and I cannot figure out how to sort it by the 3rd list item. I have tried using a comparator but I can get this to look at the 3rd list item.</p>
  
  <p>The HashMap That I'm using:</p>
  
  <pre><code>HashMap&lt;String, List&lt;String&gt;&gt; hmap= new HashMap&lt;String, List&lt;String&gt;&gt;();
  List&lt;String&gt; prod1 = new ArrayList&lt;String&gt;();
  prod1.add("123456789102");
  prod1.add("3.0");
  prod1.add("8");
  hmap.put("Blue magazine", prod1);
  List&lt;String&gt; prod2 = new ArrayList&lt;String&gt;();
  prod2.add("123456789102");
  prod2.add("2.0");
  prod2.add("7");
  hmap.put("Pink magazine", prod2);
  List&lt;String&gt; prod3 = new ArrayList&lt;String&gt;();
  prod3.add("123456789102");
  prod3.add("1.0");
  prod3.add("6");
  hmap.put("Black magazine", prod3);
  </code></pre>
  
  <p>I'm trying to sort it low - high (integers) the 2nd list item. 
  so: 6 - 7 - 8</p>
  
  <pre><code>    List list = new LinkedList(map.entrySet());
      Collections.sort(list, new Comparator() {
          public int compare(Object o1, Object o2) {
          return ((Comparable) ((Map.Entry)(o1)).getValue()).compareTo(((Map.Entry)(o2)).getValue());
          }
      });
  </code></pre>
  
  <p>Edit: Added comparator attempt per request.</p>