Fwd: Extending Collector to handle a post-transform
Ali Lahijani
alahijani at gmail.com
Wed Jun 12 08:45:38 PDT 2013
> public interface Collector<T, R> {
> <X> Tuple<T, X, R> asTuple();
That implies a universal quantification on the variable X, i.e an
implementation of Collector should support any possible values that a
caller might supply for X.
I believe the correct signature to be
Tuple<T, ?, R> asTuple();
that is an existential quantification on the anonymous type variable.
The Collector implementation decides what to put in the type variable.
That's also what you expect as a stand-in for
> interface Collector<T,R> extends BaseCollector<T,?,R> { }
Ali
More information about the lambda-libs-spec-observers
mailing list