Re: *Parameterizable*
Mircea Toma <[email protected]>
| Newsgroups | gmane.comp.java.jcontainer.interest |
|---|---|
| Message-ID | <[email protected]> |
Mauro Talevi wrote:
> But where would Parameters be defined then?
In a different package. Parameters are what Properties should have been,
a clean way to represent name-value pairs.
> In order to convert to it must be defined as object somewhere,
> and the only place I can thing of is the api.
Yes, but not the DNA API.
> Are you proposing to keep Parameters and chuck the interface only?
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);
}
Mircea