java.lang.UnsupportedOperationException


List<JSONObject> collect = parseObject.collect();
ArrayList<JSONObject> arrayList = new ArrayList<JSONObject>(collect);//沒有此轉換會java.lang.UnsupportedOperationException 報錯
if(collect.size()>0){
Collections.sort(arrayList, new Comparator<JSONObject>() {
public int compare(JSONObject o1, JSONObject o2) {
Date a=o1.getDate("op_ts");
Date b= o2.getDate("op_ts");
if (a.compareTo(b)>0) {
return 1;
} else if(a.compareTo(b)==0) {
return 0;
} else
return -1;
}
});


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM