Collectors inventory

Joe Bowbeer joe.bowbeer at gmail.com
Wed Mar 6 15:05:38 PST 2013


I'm just saying it's not what I want to see when I'm typing dot-crtl-space
after a stream in my IDE...

Something like toParallelArray().toStatistics() is OK.

Joe


On Wed, Mar 6, 2013 at 2:59 PM, Brian Goetz <brian.goetz at oracle.com> wrote:

> Its just like the toStatistics of ParallelArray; it reduces the stream to
> a Statistics object which has count, sum, min, and max methods.
>
>
> On Mar 6, 2013, at 5:57 PM, Joe Bowbeer wrote:
>
> I don't know what toStatistics does and can't guess, so I don't favor
> making it top-level on primitive streams.
>
> I'd rather encapsulate this inside Collectors where there is a chance that
> some overview documentation might explain what these more arcane
> (user-friendly?) Collectors methods do.
>
> I'm all in favor or name changes that make them more self-explanatory.
>  toMap seems like a step in that direction.
>
> Joe
>
>
> On Wed, Mar 6, 2013 at 2:51 PM, Brian Goetz <brian.goetz at oracle.com>wrote:
>
>> Breaking this into multiple messages.
>>
>> > 3. Move toStatistics directly to IntStream, LongStream, DoubleStream
>> instead of using stream.collect(toStatistics())
>>
>> No objection to adding these to IntStream and friends (one-liner), but I
>> think it also has to stay in Collectors, so that you can do things like
>> gather statistics on properties of object streams, such as "sales volume
>> statistics by salesman" queries.
>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/lambda-libs-spec-experts/attachments/20130306/5bf3d2ab/attachment.html 


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