groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Sun <realblue...@hotmail.com>
Subject Add some DGMs for java.util.stream.AbstractPipeline
Date Wed, 16 Aug 2017 03:14:21 GMT
Hi all,

       `toList` operation in the code `[1, 2, 3].stream().filter(e -> e >
1).collect(Collectors.toList())` is too verbose, I'm going to add some DGMs 
for java.util.stream.AbstractPipeline, e.g. toList, toSet, etc.

        The simplified code will be `[1, 2, 3].stream().filter(e -> e >
1).toList()`

        Any thoughts?

Cheers,
Daniel.Sun



--
View this message in context: http://groovy.329449.n5.nabble.com/Add-some-DGMs-for-java-util-stream-AbstractPipeline-tp5742594.html
Sent from the Groovy Dev mailing list archive at Nabble.com.

Mime
View raw message