Collections.sort(list, new Comparator<PriceTypeSkuNum>() { @Override public int compare(PriceTypeSkuNum o1, PriceTypeSkuNum o2) { if(o1.getPrice() > o2.getPrice()){ return 1; } if(o1.getPrice() == o2.getPrice()){ return 0; } return -1; } });
时间: 2024-11-05 13:38:57