int[] (int[] rowsIndexes, int destination) { List<String> names = getPatchNames(rowsIndexes); myPatches.removeAll(names); int[] selection = new int[rowsIndexes.length]; for (int i = 0; i < rowsIndexes.length; i++) { selection[i] = destination; myPatches.add(destination++, names.get(i)); } myNeedToUpdateFileContent = true; fireTableDataChanged(); return selection; }