List<DirDiffElementImpl> () { final int[] rows = myTable.getSelectedRows(); final ArrayList<DirDiffElementImpl> elements = new ArrayList<>(); for (int row : rows) { final DirDiffElementImpl element = getElementAt(row); if (element == null || element.isSeparator()) continue; elements.add(element); } return elements; }