vs Stream.of()

Brian Goetz brian.goetz at
Thu Aug 22 06:07:36 PDT 2013

Slight correction: it is Stream.of() that duplicates 
functionality for arrays :)

It is fine to use either.  Stream.of() is implemented in terms of; also has methods that make a stream out of 
an array slice.

On 8/22/2013 5:33 AM, Richard Warburton wrote:
> Hi,
> There are a series of methods which offer duplicate
> functionality to the Stream.of(), IntStream.of() etc methods.  I appreciate
> there's a slight difference in that one takes arrays directly, and the
> other varargs but I'm pretty sure that enough people realise that you can
> pass arrays into varargs methods to not warrant the duplication.
> regards,
>    Dr. Richard Warburton
>    @RichardWarburto <>

More information about the lambda-dev mailing list