On 14 December 2010 13:27, Oleg Kalnichevski <[email protected]> wrote: >> > >> > Makes sense to me. >> >> How about adding entrySet() to the HttpParams interface? > > We can't do that > >> Without that, DefaultedHttpParams has to assume that its local >> HttpParams extends AbstractHttpParams. >> >> Changing the interface would of course break any code that implements >> the HttpParams interface without extending AbstractHttpParams. >> >> I suppose one could extend the HttpParams interface to add the >> entrySet, and have AbstractHttpParams implement that instead. >> > > An extended or an optional interface should be ok, though > > How about an optional interface or something similar? > > interface HttpParamSet { > > Iterator iterator(); > > }
Just realised that won't gain anything, because the classes such as DefaultedHttpParams have to support HttpParams. I think the best one can do is to add the method to the abstract parent class (which most - if not all - implementations will use anyway). The optional interface could be added later if independent implementations of HttpParams needed to support entrySet - but I'm not sure it's worth adding it now? > Oleg > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
