public List<GroupEntity> getSearchAllGroupList(String key) { List<GroupEntity> searchList = new ArrayList<>(); for (Map.Entry<Integer, GroupEntity> entry : groupMap.entrySet()) { GroupEntity groupEntity = entry.getValue(); if (IMUIHelper.handleGroupSearch(key, groupEntity)) { searchList.add(groupEntity); } } return searchList; }