Re: *Parameterizable*
Mauro Talevi <[email protected]>
| Newsgroups | gmane.comp.java.jcontainer.interest |
|---|---|
| Message-ID | <[email protected]> |
Mircea Toma wrote:
>
> In a different package. Parameters are what Properties should have been,
> a clean way to represent name-value pairs.
but it's so generic that is could go anywhere :-)
> Yes, but not the DNA API.
where would you propose to put it?
> I don't understand the question. I do need the Parameters interface plus
> a default implementation because it's so handy to work with, when
> having name-value pairs type configuration. The package should have a
> utility that would do:
>
> class ParametersUtil {
> Parameters fromConfiguration(Configuration configuration);
> Parameters fromProperties(Properties properties);
> Parameters fromMap(Map map);
> Properties toProperties(Parameters parameters);
> Map toMap(Parameters parameters);
> }
yep - gotcha ;-)
I'm not disagreeing, just a question of where to put Parameters.