int endPos = (swimmersPerHeat > laneList.size()) ? laneList.size()
: swimmersPerHeat;
for (int i = heatCount; i > 0; i--) {
lanesOnHeat = laneList.subList(startPos, endPos);
lanesOnHeat = setLanesInOrder(lanesOnHeat, laneNumbers);
heatList.add(new Heat(event.getName(), i, lanesOnHeat));
startPos = startPos + swimmersPerHeat;
endPos = ((endPos + swimmersPerHeat) < laneList.size()) ? (endPos + swimmersPerHeat)
: laneList.size();
}