void (int[] rows, final S markState) { if (rows == null || rows.length == 0) { return; } int firstRow = Integer.MAX_VALUE; int lastRow = Integer.MIN_VALUE; for (final int row : rows) { final T element = myElements.get(row); final S newValue = notNullMarkState(element, markState); final S prevValue = myMarkedMap.put(element, newValue); if (!newValue.equals(prevValue)) { notifyElementMarked(element, newValue); } firstRow = Math.min(firstRow, row); lastRow = Math.max(lastRow, row); } fireTableRowsUpdated(firstRow, lastRow); }