groovy 對 list 排序

在groovy中對list排序是很簡單的事情。好比:java def list=[] list<<[name:"aa",age:1] list<<[name:"bb",age:22] list<<[name:"cc",age:33] list<<[name:"dd",age:2] def newlist=list.sort{a,b-> return a.age-b.age } newlist.e
相關文章
相關標籤/搜索