Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.0-JSR-6
-
None
-
All
Description
The method groupBy() works only for lists. It should work for Maps as well.
The code for this functionality and the respective test is commented out in DefaultGroovyMethods and GroovyMethodsTest.
public static Map groupBy(Map self, Closure closure) {
final Map answer = new HashMap();
for (final Iterator iter = self.entrySet().iterator(); iter.hasNext()
return answer;
}