Collector / Collectors

Tim Peierls tim at peierls.net
Wed Jun 26 11:51:23 PDT 2013


On Wed, Jun 26, 2013 at 2:43 PM, Brian Goetz <brian.goetz at oracle.com> wrote:

> Something like this?
>>
>> interface Collector<T, A, R> {
>>      /** Returns new collector like this one, but with finisher composed
>> with this collector's finisher. */
>>      <R2> Collector<T, A, R2> andThen(Function<? super R, ? extends R2>
>> finisher);
>> }
>>
>> with default implementation doing the obvious composition?
>>
>
> Yes, something almost exactly like that.
>

This would remove the need for Collectors.of() to take a finisher argument.

--tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/lambda-libs-spec-experts/attachments/20130626/81dd0b60/attachment.html 


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