Streams design strawman
Doug Lea
dl at cs.oswego.edu
Sun Apr 22 13:19:21 PDT 2012
On 04/22/12 12:55, Brian Goetz wrote:
>> So basically it's not a stream but something like this:
>>
>> interface Histogram<K,V> {
>> Iterable<K> keys();
>> Iterable<V> values();
>> Iterable<Entry<K,V>> entries();
>> }
>>
>> a kind of super type of a Map.
>
> It certainly could be, if we wanted to make it an eager
> (end-of-stream-pipeline) operation. But it seems more flexible to make
> it a BiStream-creating operation (even though the values need to be
> internally buffered, which I think is your underlying point),
Note that jsr166e.LongAdderTable is intended to be a useful
internal form for supporting some of these stream-y multiset-ish
operations; at least the parallel versions of them.
We'll need to adapt interfaces etc as they solidify.
http://gee.cs.oswego.edu/dl/jsr166/dist/jsr166edocs/jsr166e/LongAdderTable.html
-Doug
More information about the lambda-dev
mailing list