title: Grails sort map by key
body: <p>Hi am trying to sort a map using the map's key</p>
  
  <pre><code>finalMap.entrySet().sort{it.key}
  </code></pre>
  
  <p>But the key is not sorted as follows:</p>
  
  <pre><code>[0=org.generator.Item@1304e60, 1=org.generator.Item@699df5, 10=org.generator.Item@14944, 11=org.generator.Item@713a72, 12=org.generator.Item@1b42301, 2=org.generator.Item@1664cde, 3=org.generator.Item@1409c28, 4=org.generator.Item@cc2061, 5=org.generator.Item@161eccb, 6=org.generator.Item@13e9b, 7=org.generator.Item@1b5438d, 8=org.generator.Item@1661f7b, 9=org.generator.Item@19cf00a]
  </code></pre>