需要用自己写的comparator
Comparator<AQIRankCity> comparator = new Comparator<AQIRankCity>() { public int compare(AQIRankCity o1, AQIRankCity o2) { return o1.getRank() > o2.getRank() ? 1 : -1; } };
时间: 2024-12-12 16:59:36
需要用自己写的comparator
Comparator<AQIRankCity> comparator = new Comparator<AQIRankCity>() { public int compare(AQIRankCity o1, AQIRankCity o2) { return o1.getRank() > o2.getRank() ? 1 : -1; } };