/**
   * 无序集合转换为有序列表
   * 
   * @param set
   * @return
   */
  public static List<String> setSortToList(Set<String> set) {
    List<String> setList = new ArrayList<String>(set);
    Collections.sort(setList, new Comparator<String>() {
      @Override
      public int compare(String o1, String o2) {
        return o1.compareTo(o2);
      }
    });
    return setList;
  }

  

相关文章:

  • 2022-02-17
  • 2021-08-11
  • 2021-11-21
  • 2021-10-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-01
  • 2021-11-18
相关资源
相似解决方案