code: public static Map orderByValue(Map unsortMap, Comparator... comparators) {
          // Convert Map to List
          List<Map.Entry> list = new LinkedList<>(unsortMap.entrySet());
  
          // Sort list with comparator, to compare the Map values
          Collections.sort(list, new Comparator<Map.Entry>() {
              public int compare(Map.Entry o1, Map.Entry o2) {
                  if (comparators.length == 0) {
                      if (o1.getValue() instanceof Comparable/* && o2.getValue() instanceof Comparable*/) {
                          Comparable ov1 = (Comparable) o1.getValue()/*, ov2 = (Comparable)o2.getValue()*/;
                          return ov1.compareTo(o2.getValue());
                      } else {
                          throw new IllegalArgumentException(o1.getValue().getClass() + " 必须是comparable,否则无法进行比较排序");
                      }
                  } else {
                      return comparators[0].compare(o1.getValue(), o2.getValue());
                  }
              }
          });
  
          // Convert sorted map back to a Map
          Map sortedMap = new LinkedHashMap<String, Integer>();
          for (Iterator<Map.Entry> it = list.iterator(); it.hasNext(); ) {
              Map.Entry<String, Integer> entry = it.next();
              sortedMap.put(entry.getKey(), entry.getValue());
          }
          return sortedMap;
      }
docs: 根据map的value进行排序