List<String> () { final List<String> items = new ArrayList<>(); for (InnerClassItem item : doNotInsertInnerListModel.getItems()) { final String name = item.getName().trim(); if (!name.isEmpty()) { items.add(name); } } return items; }