Can anyone point me to an example of how to use a Map in Groovy which has a String as its key and a List as value?
Map
String
List
Joseph forgot to add the value in his example with withDefault. Here is the code I ended up using:
withDefault
Map map = [:].withDefault { key -> return [] } listOfObjects.each { map.get(it.myKey).add(it.myValue) }