Joined September 2012
·

Paul Gearon

Revelytix
·
Spotsylvania, VA
·
·
·

I'm also curious about trying Java Lambdas, which will be in JDK8 this year. The code for the above would be (I think):

userService.getByGroupId(12).filter(e -> e.isActive()).map(e -> e.getId());

This is very similar to the Scala version, without the _ shorthand. I don't know how this will compare in performance, but it does have the advantage of generating a lazy result.

Achievements
110 Karma
3,208 Total ProTip Views