Hi All, Hope everyone is having a nice weekend! :) I'm working with a 3rd party library that uses java.util.Properties objects to store configuration data. I currently have a Framework Parameters object with the config data in it, and are atm manually converting it to a Properties object. I was thinking that this operation of converting a Parameters object to a Properties object was general enough to go into the Parameters class itself ? Something like: /** * Helper method to convert an Avalon Parameters object into a Java Util * Properties object. * * @param p a <code>Parameters</code> instance * @return a <code>Properties</code> instance */ private Properties parametersToProperties(Parameters p) { Properties prop = new Properties(); String[] names = p.getNames();
for (int i = 0; i < names.length; ++i) { // "" is the default value, since getNames() proves it will exist prop.setProperty(names[i], p.getParameter(names[i], "")); } return prop; } Any thoughts ? Cheers, Marcus -- ..... ,,$$$$$$$$$, Marcus Crafter ;$' '$$$$: Computer Systems Engineer $: $$$$: ManageSoft GmbH $ o_)$$$: 82-84 Mainzer Landstrasse ;$, _/\ &&:' 60327 Frankfurt Germany ' /( &&& \_&&&&' email: [EMAIL PROTECTED] &&&&. &&&&&&&: -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>