void (int handles, int firstRow, int lastRow) { int rows = rowEntry.getModelRowCount() - 1; if (lastRow == -1) { lastRow = rows; } boolean fullMode = (firstRow == 0) && (lastRow == rows); int check = handles; for (int i = 0; i < check;) { if (editorHandles[i].startIteration(fullMode)) { // if startIteration returns true, this editor will require // no additional iteration (move it to the end) switchHandle(i, --check); } else { ++i; } } if (check > 0) { iterateRows(check, firstRow, lastRow); } while (handles-- > 0) { editorHandles[handles].iterationCompleted(fullMode); } }