Functions.identity() equivalent
Henry Jen
henry.jen at oracle.com
Thu Apr 18 12:25:35 PDT 2013
Long::longValue?
It's not shorter than l -> l though.
Cheers,
Henry
On Apr 18, 2013, at 11:52 AM, Michael Nascimento <misterm at gmail.com> wrote:
> Hi guys,
>
> One common scenario here is having a Map<Something, Long> and wanting
> to do something with the values. So I (think I) have to do:
>
> totalBySomething.values().parallelStream().mapToLong(l -> l)...
>
> because I cannot use Functions.identity() here. This shows up pretty
> often. Anything planned for that?
>
> Regards,
> Michael
>
More information about the lambda-dev
mailing list