List<String> (ExclusionScope scope) { List<String> result = new ArrayList<>(); for (Item pair : getTableView().getListTableModel().getItems()) { if (scope == pair.scope) { result.add(pair.exclude); } } Collections.sort(result); return result; }