//TODO //集合排序, List arrayList = new ArrayList(enterpriseEntityList1); Collections.sort(arrayList, new Comparator<EnterpriseEntity>() { @Override public int compare(EnterpriseEntity o1, EnterpriseEntity o2) { /*按漏检数正序排序*/ //return o1.getEmpno() - o2.getEmpno(); /*按漏检数逆序排序*/ return o2.inspectionRecordMarkUuidCount - o1.inspectionRecordMarkUuidCount; } });
JAVA 集合排序
最新推荐文章于 2025-05-26 13:12:23 发布