RFR: JDK-8205461 Create Collector which merges results of two other collectors
Peter Levart
peter.levart at gmail.com
Tue Aug 21 07:04:08 UTC 2018
Hi Stuart,
On 08/21/2018 07:43 AM, Stuart Marks wrote:
> 2. Characteristics
>
> - UNORDERED: should the returned collector be UNORDERED if *either*
> of the provided collectors is UNORDERED? (Current draft says *both*.)
I think *both* is the right behavior. If you are collecting:
teeingAndThen(
Collectors.toList(),
Collectors.toSet(),
Map::entry
)
...then you might want the returned List part of result to respect
encounter order regardless of the returned Set part which doesn't.
Regards, Peter
More information about the core-libs-dev
mailing list