Hello: Currently, the class VariableFormatter is called a "Formatter" and not a "Format" to make it clear that the implementation is not based on the JRE Format class.
As Simon Kitching on Tue, 05 Jul 2005: " MessageFormat is based on defining a template "My {0} is {1}.", then evaulating this for different values of {0} and {1}. The (proposed) VariableFormat is based on defining a source of variable info (Map), then evaulating different template strings against that map. I think the current VariableFormat approach is the right approach for mapped data but this difference implies that care should be taken when drawing any parallels between these classes. I think this is what Gary meant above; that if this class cannot be implemented as a subclass of java.text.MessageFormat (or at least a subclass of java.text.Format) then it shouldn't have Format in the name. And it doesn't seem that it can (or should) do this, so I would like to see whatever solution is agreed on avoid the name "Format". " Simon's full message is here: http://www.mail-archive.com/commons-dev@jakarta.apache.org/msg63493.html Gary > -----Original Message----- > From: Tom Schindl [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 09, 2005 4:12 AM > To: Jakarta Commons Developers List > Subject: Re: [lang] Questions concerning VariableFormatter > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Oliver Heger schrieb: > > Tom Schindl wrote: > > > >> Stephen Colebourne schrieb: > >> > >> >Please prefix emails by [lang] > > > [...] > > An alternative would be to provide an additional implementation of the > > VariableResolver interface. The default implementation stays as is and > > does not handle formats. An extended implementation could support > > further arguments that are appended to variables. > > > > Oliver > > so i did now and added a new resolver based upon the existing one. What > this patch does: > - - added a new Resolver named MapVariableResolverWithFormats > - - static functions to turn Formats on/off > => default methods changed to use Formats > - - new constructors > > Hope that's better than my first try. I didn't have a enough time to > look closer at how to make VariableFormatter extend Format which I'd > desire most so that the interface between MessageFormat and > VariableFormatter is equal. > > > > > <snip/> > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.0 (GNU/Linux) > Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org > > iD8DBQFC+I+YkVPeOFLgZFIRAlszAJsGCQ7fdUnKtsho4rEvxliptJMQTACeKv1d > U1wwIvsx++Bw6Rn65CD7yCg= > =5lYH > -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]