Hello:

Should such proposed StrBuilder methods also not be in StringUtils? 

Whichever way we go (or provide both), I can still see the benefit of a
class that can be instantiated and configured with "$" "{", "}" and a
map.

Gary

-----Original Message-----
From: Stephen Colebourne [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 27, 2005 3:36 PM
To: Jakarta Commons Developers List
Subject: Re: [lang] text.Interpolation, on to 2.2

Gary Gregory wrote:
> Hello Oliver:
> I took a quick look at the ticket you linked to below. For this to
work
> for System properties, a simple VariableResolver would do the trick I
> think. Maybe a generic MapVariableResolver could also be provided and
> maybe a factory methods in order to say simple things like:
> 
> Interpolator.newInterpolator(System.getProperties()).resolve("The file
> is here ${java.io.tmpdir}");

I should point out that System.getProperties() returns a Properties 
which extends Hashtable which implements Map. So, these are not two 
separate use cases.

Thus an API of the form might be enough:
  StrBuilder.replace(prefix, suffix, map)
  StrBuilder.replaceAll(prefix, suffix, map)

Stephen

---------------------------------------------------------------------
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]

Reply via email to