leftMinimumFirstDayIndex = lastDayIndex;
} else {
otherEmployee = leftEmployee;
rightMinimumFirstDayIndex = lastDayIndex;
}
moveListByPillarPartDuo.add(new EmployeeMultipleChangeMove(
pillarPartAssignmentSequence.getEmployee(),
pillarPartAssignmentSequence.getShiftAssignmentList(),
otherEmployee));
// For every AssignmentSequence in that pillar part duo
while (lowestIt.hasNextWithMaximumFirstDayIndexes(
leftMinimumFirstDayIndex, rightMinimumFirstDayIndex)) {
pillarPartAssignmentSequence = lowestIt.next();
lastDayIndex = pillarPartAssignmentSequence.getLastDayIndex();
if (lowestIt.isLastNextWasLeft()) {
otherEmployee = rightEmployee;
leftMinimumFirstDayIndex = Math.max(leftMinimumFirstDayIndex, lastDayIndex);
} else {
otherEmployee = leftEmployee;
rightMinimumFirstDayIndex = Math.max(rightMinimumFirstDayIndex, lastDayIndex);
}
moveListByPillarPartDuo.add(new EmployeeMultipleChangeMove(
pillarPartAssignmentSequence.getEmployee(),
pillarPartAssignmentSequence.getShiftAssignmentList(),
otherEmployee));
}
moveList.add(new CompositeMove(moveListByPillarPartDuo));