for (ListIterator<Lecture> leftIt = lectureList.listIterator(); leftIt.hasNext();) {
Lecture leftLecture = leftIt.next();
for (ListIterator<Lecture> rightIt = lectureList.listIterator(leftIt.nextIndex()); rightIt.hasNext();) {
Lecture rightLecture = rightIt.next();
if (!leftLecture.getCourse().equals(rightLecture.getCourse())) {
moveList.add(new LectureSwapMove(leftLecture, rightLecture));
}
}
}
return moveList;
}