title: Sorting hash function and Compile error
body: <p>I used this method to sorting my hash function. When I compile the program, these errors appear:</p>
  
  <pre><code>Note: Retriever.java uses unchecked or unsafe operations.
  Note: Recompile with -Xlint:unchecked for details.
  </code></pre>
  
  <p>My <code>hashMap&lt;String, Double&gt;</code></p>
  
  <pre><code>private static Map sortByComparator(Map unsortMap) {
  
      List list = new LinkedList(unsortMap.entrySet());
  
      // sort list based on comparator
      Collections.sort(list, new Comparator() {
          @Override
          public int compare(Object o1, Object o2) {
              return ((Comparable) ((Map.Entry) (o2)).getValue())
                      .compareTo(((Map.Entry) (o1)).getValue());
          }
      });
  
      // put sorted list into map again
      Map sortedMap = new LinkedHashMap();
      for (Iterator it = list.iterator(); it.hasNext();) {
          Map.Entry entry = (Map.Entry) it.next();
          sortedMap.put(entry.getKey(), entry.getValue());
      }
      return sortedMap;
  }
  </code></pre>