eric-milles opened a new pull request #1656:
URL: https://github.com/apache/groovy/pull/1656


   https://issues.apache.org/jira/browse/GROOVY-7001
   
   I stopped short of `collectEntries` methods.  They don't have quite the same 
problem -- map return is probably okay, whereas the distinction between set, 
list and collection is often important.
   
   I also changed the return type of some variants to List and added the 
Collection bridges.
   
   There is some inconsistency between some the variations.  In cases where the 
input and output types are different, collect (except map variant) is listing 
the input type first where collectMany and others list input type(s) second.  I 
did not make any changes (except to use `E` instead of `S`).
   ```java
       <E, T> List<T> collect(E[] self, 
@ClosureParams(FirstParam.Component.class) Closure<T> transform)
       <T, K, V> List<T> collect(Map<K, V> self, 
@ClosureParams(MapEntryOrKeyValue.class) Closure<T> transform)
       <T, E> List<T> collectMany(E[] self, 
@ClosureParams(FirstParam.Component.class) Closure<...> projection)
       <T, K, V> List<T> collectMany(Map<K, V> self, 
@ClosureParams(MapEntryOrKeyValue.class) Closure<...> projection)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@groovy.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to