Arrays methods

Brian Goetz brian.goetz at oracle.com
Wed Mar 13 12:25:27 PDT 2013


> If we added
>
>       <T> void fill(T[], IntFunction<T> gen)
>
> then existing calls to
>
>    fill(array, null)
>
> would become ambiguous.  Doh.  (But the other 17 forms are not
> problematic.)
>
> Any suggestions for alternate names?

Arrays.generate(array, fn)
Arrays.fillApplying(array, fn)
Arrays.initialize(array, fn)
Arrays.setAll(array, fn)

...


More information about the lambda-libs-spec-experts mailing list