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