Have the next code:
public static Map<String, Double> getSumOfPricesPerCategoryOver(){
List<Videogame> number = videogames;
Map<String, Double> counted = number
.stream()
.collect(Collectors.groupingBy(Videogame::getCategoria, Collectors.summingDouble(Videogame::getPrecio)));
return counted;
}
Problem
I would like to filter the group of categories that the sum of their prices are higher than 200 , any idea?