478479480481482483484485
startPos = startPos + swimmersPerHeat; endPos = ((endPos + swimmersPerHeat) < laneList.size()) ? (endPos + swimmersPerHeat) : laneList.size(); } Collections.sort(heatList, new HeatComparator()); return heatList; }