List<MoreAction> () { List<MoreAction> result = new ArrayList<>(); ListPopupModel model = getListModel(); for (int i = 0; i < model.getSize(); i++) { MoreAction moreAction = getSpecificAction(model.getElementAt(i), MoreAction.class); if (moreAction != null) { result.add(moreAction); } } return result; }