title: Sort HashMap basis on Object's member variable from value
body: <p>Have one class</p>
  
  <pre><code>class Employee {
      int id;
      String name;
  }
  </code></pre>
  
  <p>and one map which contains this object in value</p>
  
  <pre><code>Map&lt;Integer, Employee&gt; map = new HashMap&lt;Integer, Employee&gt;();
  </code></pre>
  
  <p>Now I want to sort above <code>map</code> one the basis of <code>Employee's name</code>. Means when I iterate this map using <code>Map.Entry</code>, <code>Employee</code> objects must retrive alphabetically.</p>
  
  <p>Thanks in advance</p>