On 15 December 2010 15:26, Oleg Kalnichevski <[email protected]> wrote: > ... > >> In the case of DefaultedHttpParams, I think the local names should >> also be made available, e.g. through a method such as getLocalNames(). >> But the default getNames() should include all names. >>
It's easy create a new Set with the current set of names - much harder to create a read-only Set that tracks subsequent changes to both local and default sets - so I propose to create a new Set in each case, i.e. the Sets will be a snapshot of the current names. This also completely decouples the output from the implementation. I've updated SVN accordingly. >> The default names can be easily extracted using getDefaults().getNames(). >> >> Though I do wonder why the getDefaults() method is present: given that >> defaults are supposed to be immutable, it seems odd to expose the >> field and thus permit updates to it. >> >> Perhaps the method should be deprecated? >> Or maybe the method should return an immutable view of the defaults? >> > > Agreed. Feel free to deprecate it. OK, done. > 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]
