Streams factories in Stream

Brian Goetz brian.goetz at oracle.com
Tue Apr 23 12:14:48 PDT 2013


> Stream.of()/empty()
> Naive like me use Stream.of()  for empty  but loose the optimized version
> empty().
> Isn't it better to get rid of empty() and optimized of()

Except its not optimized.  You've already paid the cost of boxing the args into an empty array.  :(



More information about the lambda-dev mailing list