commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Crum <adrian.c...@sandglass-software.com>
Subject Re: [Lang] Pair toString
Date Mon, 11 Apr 2011 15:33:27 GMT
Why not make your custom Pair class a delegator?

-Adrian

On 4/11/2011 7:00 AM, Gary Gregory wrote:
> Hi All:
>
> I added a test to verify the default Pair toString behavior.
>
> For me to replace our custom Pair class at work, I need to customize the to
> String behavior.
>
> Subclassing ImmutablePair and MutablePair to override toString smells nasty.
>
> What about adding a formatString ivar which will be used with the
> String.format API?
>

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


Mime
View raw message