Add some DGMs for java.util.stream.AbstractPipeline

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Add some DGMs for java.util.stream.AbstractPipeline

Daniel Sun
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
Reply | Threaded
Open this post in threaded view
|

Re: Add some DGMs for java.util.stream.AbstractPipeline

Daniel Sun
Adding some DGMs for `java.util.stream.Stream` seems better.

Cheers,
Daniel.Sun
Reply | Threaded
Open this post in threaded view
|

Re: Add some DGMs for java.util.stream.AbstractPipeline

Jochen Theodorou
I agree, because AbstractPipeline is package private ;)

On 16.08.2017 05:23, Daniel Sun wrote:

> Adding some DGMs for `java.util.stream.Stream` seems better.
>
> Cheers,
> Daniel.Sun
>
>
>
> --
> View this message in context: http://groovy.329449.n5.nabble.com/Add-some-DGMs-for-java-util-stream-AbstractPipeline-tp5742594p5742595.html
> Sent from the Groovy Dev mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Add some DGMs for java.util.stream.AbstractPipeline

Daniel Sun
haha :)