Given the class:
public class CategoryValuePair
{
String category;
String value;
}
And a method:
public Map<String,List<String>> convert(CategoryValuePair[] values);
Given that in values
we can receive many entries with the same category, I want to convert these into a Map
grouped on category.
Is there a quick / efficient way to perform this conversion?