title: Sorted by value HashMap
body: <p>I have a HashMap <code>HashMap&lt;String, List&lt;OtherModel&gt;&gt;</code> - I need to sort by the field of the first <code>List&lt;OtherModel&gt;</code> element, have any ideas?)</p>
  <p>I have incorrect code for example:</p>
  <pre><code> public static HashMap&lt;String, List&lt;AsoInfoModel&gt;&gt; sortAsoByValue(HashMap&lt;String, List&lt;AsoInfoModel&gt;&gt; items) {
          List&lt;Map.Entry&lt;String, List&lt;AsoInfoModel&gt;&gt;&gt; list = new LinkedList&lt;&gt;(items.entrySet());
          list.stream().sorted(Comparator.comparing(Map.Entry::getValue::AsoInfoModel::position, Comparator.naturalOrder());
  
          HashMap&lt;String, List&lt;AsoInfoModel&gt;&gt; temp = new LinkedHashMap&lt;&gt;();
          for (Map.Entry&lt;String, List&lt;AsoInfoModel&gt;&gt; aa : list) {
              temp.put(aa.getKey(), aa.getValue());
          }
          return temp;
      }
  </code></pre>