首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > 动态java java排序列表1.5

动态java java排序列表1.5

  • 资源大小:8.75 kB
  • 上传时间:2021-06-29
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: 排序 动态 列表 javajava

资 源 简 介

list-sorter sorts your java lists in a flexible way. Following samples shows how list sorter sorts sample Employee objects either its functions or custom rules. ``` //Sorting by name and surname.You can define your rules at sortOrder function SortUtil.sort(yourEmployeeList); ``` ``` //Sorting by name.String array parameter is for getting path of the sort method. //In this case you don"t have to define sortOrder method SortUtil.sort(yourEmployeeList, new String[] { "getName" }); ``` ``` //if your sorting based on string in your locale just pass your locale. SortUtil.sort(yourEmployeeList, new String[] { "getName" },locale); ``` ``` //Sorting by department name.we are defining the sort method path. SortUtil.sort(yourEmployeeList, new String[] { "getDepartment","getDepartmentName" }); ``` ``` //Sort your list by descending order SortUtil.sort(yourEmplo
VIP VIP
0.245032s