On Wed, 8 Nov 2023 17:17:21 GMT, Rémi Forax <fo...@openjdk.org> wrote:

>> src/java.base/share/classes/java/util/stream/Gatherer.java line 330:
>> 
>>> 328:     static <T, R> Gatherer<T, Void, R> ofSequential(
>>> 329:             Integrator<Void, T, R> integrator,
>>> 330:             BiConsumer<Void, Downstream<? super R>> finisher) {
>> 
>> Probably, accepting `Consumer<Downstream<? super R>>` and adapting it would 
>> be more user-friendly?
>
> In that case the integrator should be a BiConsumer too, no ?

@forax I thought so initially, but this is not so easy, as there's a `Greedy` 
subinterface. If you adapt the `Integrator`, you will lose the ability to 
specify the greediness.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16420#discussion_r1386964483

Reply via email to