Collection<CardInfo> values = splitCardInfo.getCardType().values();
Iterator<CardInfo> iterator = values.iterator();
List<Integer> list = new ArrayList<>();
while (iterator.hasNext()){
if (list.isEmpty()){
list.addAll(iterator.next().getCards());
} else {
resultList.addAll(list.size() > iterator.next().getCards().size() ? list:
iterator.next().getCards());
break;
}
}