版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_32534855/article/details/87854953
//升序
newList.sort((Record c1,Record c2)-> Double.valueOf(c1.getStr("distance")).compareTo(Double.valueOf(c2.getStr("distance"))));
//降序
newList.sort((Record c1,Record c2)-> Double.valueOf(c2.getStr("distance")).compareTo(Double.valueOf(c1.getStr("distance"))));