Extending Collector to handle a post-transform

Brian Goetz brian.goetz at oracle.com
Tue Jun 11 16:24:42 PDT 2013


> Still don't get why you can not do:
> interface SimpleCollector<T, R> extends Collector<T, R, R> {
>    ...
> }

Not all Collectors will have I=R.  Consider toStringBuilder, where 
I=StringBuilder and R=String.


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