Collector / Collectors

Brian Goetz brian.goetz at oracle.com
Wed Jun 26 11:43:43 PDT 2013


> 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.


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