Updated State of the Collections
Sam Pullara
sam at sampullara.com
Thu Nov 15 23:34:16 PST 2012
Something like:
namesColl.flatMap( (sink, name) -> { for (PolyLine line : lines(name)) sink.accept(line); } ).into(...);
Didn't compile it, but that is the idea.
Sam
On Nov 15, 2012, at 10:58 PM, "Jose" <jgetino at telefonica.net> wrote:
>
> Would you mind to provide an example of the use of flatMap?.
>
> I need to adapt old b56 code like this:
>
> Set<Polyline> lines(mapName){};
> namesColl.flatMap(name -> lines(name)).into(...);
>
> to the new sintax but I have no idea how to start with (do I have to provide
> a Block.instance?)
>
> I made some web search on flatMap and jdk8 but everyone seems to be talking
> about Optional.
> And in the repos I couln't find a single example, only discussions about the
> sintax.
>
>
>
>
> -----Mensaje original-----
> De: lambda-dev-bounces at openjdk.java.net
> [mailto:lambda-dev-bounces at openjdk.java.net] En nombre de Brian Goetz
> Enviado el: jueves, 15 de noviembre de 2012 19:32
> Para: lambda-dev at openjdk.java.net
> Asunto: Updated State of the Collections
>
> is here: http://cr.openjdk.java.net/~briangoetz/lambda/sotc3.html
>
>
More information about the lambda-dev
mailing list