可以像这样使用Collections.sort(object)比较int值:Collections.sort(priceList,newComparator(){@Overridepublicintcompare(MyObjecto1,MyObjecto2){returnInteger.parseInt(o1.getPrice())-Integer.parseInt(o2.getPrice());}});和Long.compare在API19及更高版本中可用,以使用Collections.sort(object)比较长值:Collections.sort(priceList,newCo