commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Colebourne <scolebou...@joda.org>
Subject Re: FormattableUtils
Date Wed, 04 May 2011 13:01:46 GMT
On 4 May 2011 13:47, Matt Benson <gudnabrsam@gmail.com> wrote:
> At some point Hen mentioned the idea of a PairFormat class.  I don't
> think this is a bad idea, but the parsing capabilities of such a beast
> would be minimal to nonexistent, and it still doesn't seem that it
> would be configurable in a simple way without doing the equivalent of
> String.format("", left, right).  At this point I am still not sure
> what is the right mechanism for providing custom string
> representations of Pair in the simplest and most elegant possible way.
>  Have any ideas?

Not really.

toString(format) does the job of custom formatting pretty well.
Anything else is a wrapper around that which feels pretty unecessary.

Thus, I'd like to make Pair no longer implement Formattable (BTW, I
don't think anything in the JDK implements Formattable, so its a weird
interface).

Stephen

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message