Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
Patch
Description
Move many methods from Collection to Iterable.
Added these methods to Iterable.
contains(Object)
containsAll(Object[])
eachPermutation(Closure)
inject(Closure)
head()
tail()
asCollection()
plus(Iterable)
plus(Object)
multiply(Number)
intersect(Iterable)
toSet()
Deprecated this method from Collection.
eachPermutation(Closure)
Did not add these methods to Iterable because GPathResult conflicts.
Read https://github.com/groovy/groovy-core/pull/444 for the detail.
toListString()
toListString(int)
I also added this method.
DefaultGroovyMethodsSupport.createSimilarCollection(Iterable)
I cannot move these methods because they exists in Object
and Groovy cannot handle properly if I move them from Collection to Iterable.
grep(Object)
grep()
collect(Closure)
collect()
collect(Collection, Closure)
find(Closure)
find()
findResult(Object, Closure)
findResult(Closure)
findAll(Closure)
findAll()
split(Closure)
inject(Closure)
inject(Object, Closure)
The pull request is here.
https://github.com/groovy/groovy-core/pull/444