That's what I thought too. Although there's one :: case that .& doesn't support in Groovy. (details escape me at this point as I'm in a hurry to go & grab lunch :D)
On Wed, Oct 19, 2016 at 12:23 PM, daniel_sun <realblue...@hotmail.com> wrote: > Hi Jochen, > > I plan to map Java's *::* to Groovy's *.&*, the following code is ok > now. What do you think about it? > > [1, 2, 3].stream().forEach(System.out.&println) // object method, > [1, 2, 3].stream().forEach(System.out::println) > [1, 2, 3].stream().forEach(Objects.&requireNonNull) // class method, [1, > 2, > 3].stream().forEach(Objects::requireNonNull) > > Cheers, > Daniel.Sun > > > > -- > View this message in context: http://groovy.329449.n5. > nabble.com/Lambda-expression-for-Groovy-3-tp5736169p5736195.html > Sent from the Groovy Dev mailing list archive at Nabble.com. > -- Guillaume Laforge Apache Groovy committer & PMC Vice-President Developer Advocate @ Google Cloud Platform Blog: http://glaforge.appspot.com/ Social: @glaforge <http://twitter.com/glaforge> / Google+ <https://plus.google.com/u/0/114130972232398734985/posts>