title: How to sort HashMap entries values by multiple properties Java8
body: <p>How sort HashMap entries by multiple properties.</p>
  
  <p>Suppose I have a map with key String and value as Object.</p>
  
  <pre><code>Map&lt;String, UserMetrics&gt; map = new HashMap&lt;&gt;
  map.put("user10",new UserMetrics(1,100,111));
  map.put("user3",new UserMetrics(10,330,444));
  map.put("user11",new UserMetrics(333,100,555));
  map.put("user1",new UserMetrics(1,111,433));
  
   public static class UsageMetrics implements Serializable {
          private long param1;
          private long param2;
          private long param3;....
   }
  </code></pre>
  
  <p>I want to sort users first by "param1" and then after by "param2"</p>
  
  <p>result expected:&lt;></p>
  
  <pre><code>user10, UserMetrics(1,100,111)
  user1,  UserMetrics(1,111,433))
  user3,  UserMetrics(10,330,444));
  user11, UserMetrics(333,100,555))
  </code></pre>