please review draft JEP: Convenience Factory Methods for Collections

Stuart Marks stuart.marks at
Mon Jul 21 20:57:05 UTC 2014

On 7/19/14 2:04 AM, Remi Forax wrote:
> You can combine these 2 approachesi using a Ruby like builder approach with a
> lambda,
> which provide a builder object (so static method call are replaced by instance
> method call) avoiding the creation of too many entry objects
> Map.of(b -> b
>          .entry(k0, v0)
>          .entry(k1, v1)
>            ...
>          .entry(kN, vN))

Very interesting! I'll take a look at this approach.

Some of the internal feedback on this JEP draft before I posted it here was, 
(jokingly) "What, it doesn't use lambda??" Now we might have a way to work 
lambda into this. :-)


More information about the core-libs-dev mailing list