标签:
Collections.sort(hits_list, new Comparator<ScoreDoc>(){ @Override public int compare(ScoreDoc arg0, ScoreDoc arg1) { if( arg0.score < arg1.score ) return 1; return 0; } } );
重写一个比较对象即可。
Java ArrayList Sort
原文地址:http://www.cnblogs.com/25-to-life/p/4684666.html