List<Move> moveList = new ArrayList<Move>();
for (ListIterator<Assignment> leftIt = assignmentList.listIterator(); leftIt.hasNext();) {
Assignment leftAssignment = leftIt.next();
for (ListIterator<Assignment> rightIt = assignmentList.listIterator(leftIt.nextIndex()); rightIt.hasNext();) {
Assignment rightAssignment = rightIt.next();
moveList.add(new AssignmentSwitchMove(leftAssignment, rightAssignment));
}
}
return moveList;
}