标签:== ships return 集合排序 over style nbsp tor col
Collections.sort(ydShips, new Comparator<YdShip>() { @Override public int compare(YdShip o1, YdShip o2) { if(o1.getNumber()> o2.getNumber()){ //number是用来排序的列 return 1; }else if(o1.getNumber()==o2.getNumber()){ return 0; } return -1; } });
标签:== ships return 集合排序 over style nbsp tor col
原文地址:https://www.cnblogs.com/HQ0422/p/11439300.html