1. Map<String, List<cityBean>> cityGroups = list.stream().collect(Collectors.groupingBy(cityBean::getCityName));