Loose end: collect signature
Brian Goetz
brian.goetz at oracle.com
Wed Jul 10 14:14:57 PDT 2013
Ah, now I remember why we did it this way. For three-arg collect(),
BiConsumer<A,A> matches the signature of existing methods like
List::addAll, StringBuilder::add, BitSet::and, so it is easier to use
these with method refs.
On 7/10/2013 5:12 PM, Brian Goetz wrote:
> In reviewing the docs, I notice that the signature for the three-arg
> collect() is gratuitously out of sync with Collector.
>
> Collector is a tuple of ( Supplier<A>, BiConsumer<A,T>,
> BinaryOperator<A> ). But collect() takes a Supplier<A>, a
> BiConsumer<A,T>, and a BiConsumer<A,A>.
>
> I think we should change the three-arg collect() to match Collector.
>
More information about the lambda-libs-spec-observers
mailing list