On 20/04/2011, Matt Benson wrote:
> On Wed, Apr 20, 2011 at 1:10 AM, Henri Yandell wrote:
>> Is Pair now good (for a value of consensually agreed good)?
>
> Good enough, although Stephen noted in ImmutablePair's javadoc that
> being non-final, a subclass could add
> undesirable/counter-to-expecta
Am 21.04.2011 08:24, schrieb Jörg Schaible:
Hi Hen,
Henri Yandell wrote:
On Wed, Apr 20, 2011 at 3:25 PM, Gary Gregory
wrote:
[snip]
PairFormat class needed rather than relying on toString functionality :)
Could we implement Formattable?
+1
Something new learned today :)
- Jörg
Yes
Hi Hen,
Henri Yandell wrote:
> On Wed, Apr 20, 2011 at 3:25 PM, Gary Gregory
> wrote:
[snip]
>
> PairFormat class needed rather than relying on toString functionality :)
>
> Could we implement Formattable?
+1
Something new learned today :)
- Jörg
On Wed, Apr 20, 2011 at 3:25 PM, Gary Gregory wrote:
> On Wed, Apr 20, 2011 at 5:07 PM, Matt Benson wrote:
>
>> On Wed, Apr 20, 2011 at 3:46 PM, Gary Gregory
>> wrote:
>> > On Wed, Apr 20, 2011 at 4:36 PM, Jörg Schaible > >wrote:
>> >
>> >> Gary Gregory wrote:
>> >>
>> >> > On Wed, Apr 20, 2011
On Wed, Apr 20, 2011 at 5:07 PM, Matt Benson wrote:
> On Wed, Apr 20, 2011 at 3:46 PM, Gary Gregory
> wrote:
> > On Wed, Apr 20, 2011 at 4:36 PM, Jörg Schaible >wrote:
> >
> >> Gary Gregory wrote:
> >>
> >> > On Wed, Apr 20, 2011 at 1:24 PM, Matt Benson
> >> wrote:
> >> >
> >> >> On Wed, Apr 2
On Wed, Apr 20, 2011 at 4:07 PM, Matt Benson wrote:
> On Wed, Apr 20, 2011 at 3:46 PM, Gary Gregory wrote:
>> On Wed, Apr 20, 2011 at 4:36 PM, Jörg Schaible wrote:
>>
>>> Gary Gregory wrote:
>>>
>>> > On Wed, Apr 20, 2011 at 1:24 PM, Matt Benson
>>> wrote:
>>> >
>>> >> On Wed, Apr 20, 2011 at 1:
On Wed, Apr 20, 2011 at 3:46 PM, Gary Gregory wrote:
> On Wed, Apr 20, 2011 at 4:36 PM, Jörg Schaible wrote:
>
>> Gary Gregory wrote:
>>
>> > On Wed, Apr 20, 2011 at 1:24 PM, Matt Benson
>> wrote:
>> >
>> >> On Wed, Apr 20, 2011 at 1:10 AM, Henri Yandell
>> >> wrote:
>> >> > Is Pair now good (fo
On Wed, Apr 20, 2011 at 4:36 PM, Jörg Schaible wrote:
> Gary Gregory wrote:
>
> > On Wed, Apr 20, 2011 at 1:24 PM, Matt Benson
> wrote:
> >
> >> On Wed, Apr 20, 2011 at 1:10 AM, Henri Yandell
> >> wrote:
> >> > Is Pair now good (for a value of consensually agreed good)?
> >>
> >> Good enough, al
Gary Gregory wrote:
> On Wed, Apr 20, 2011 at 1:24 PM, Matt Benson wrote:
>
>> On Wed, Apr 20, 2011 at 1:10 AM, Henri Yandell
>> wrote:
>> > Is Pair now good (for a value of consensually agreed good)?
>>
>> Good enough, although Stephen noted in ImmutablePair's javadoc that
>> being non-final,
On Wed, Apr 20, 2011 at 1:24 PM, Matt Benson wrote:
> On Wed, Apr 20, 2011 at 1:10 AM, Henri Yandell wrote:
> > Is Pair now good (for a value of consensually agreed good)?
>
> Good enough, although Stephen noted in ImmutablePair's javadoc that
> being non-final, a subclass could add
> undesirabl
On 20 April 2011 18:24, Matt Benson wrote:
> On Wed, Apr 20, 2011 at 1:10 AM, Henri Yandell wrote:
>> Is Pair now good (for a value of consensually agreed good)?
>
> Good enough, although Stephen noted in ImmutablePair's javadoc that
> being non-final, a subclass could add
> undesirable/counter-t
On Wed, Apr 20, 2011 at 1:10 AM, Henri Yandell wrote:
> Is Pair now good (for a value of consensually agreed good)?
Good enough, although Stephen noted in ImmutablePair's javadoc that
being non-final, a subclass could add
undesirable/counter-to-expectation behavior. I can't see any reason
why we
Is Pair now good (for a value of consensually agreed good)?
On Mon, Apr 11, 2011 at 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.
>
> Subcla
On Mon, Apr 11, 2011 at 6:36 PM, Gary Gregory wrote:
> On Mon, Apr 11, 2011 at 4:25 PM, Matt Benson wrote:
>
>> On Mon, Apr 11, 2011 at 1:17 PM, Gary Gregory
>> wrote:
>> > On Mon, Apr 11, 2011 at 2:14 PM, Gary Gregory > >wrote:
>> >
>> >> On Mon, Apr 11, 2011 at 1:52 PM, Stephen Colebourne <
>>
On Mon, Apr 11, 2011 at 4:25 PM, Matt Benson wrote:
> On Mon, Apr 11, 2011 at 1:17 PM, Gary Gregory
> wrote:
> > On Mon, Apr 11, 2011 at 2:14 PM, Gary Gregory >wrote:
> >
> >> On Mon, Apr 11, 2011 at 1:52 PM, Stephen Colebourne <
> scolebou...@joda.org>wrote:
> >>
> >>> I fixed the Map.Entry eq
On Mon, Apr 11, 2011 at 1:17 PM, Gary Gregory wrote:
> On Mon, Apr 11, 2011 at 2:14 PM, Gary Gregory wrote:
>
>> On Mon, Apr 11, 2011 at 1:52 PM, Stephen Colebourne
>> wrote:
>>
>>> I fixed the Map.Entry equals/hashCode compliance.
>>>
>>> I shortened the toString form to omit the class name, as
On Mon, Apr 11, 2011 at 2:14 PM, Gary Gregory wrote:
> On Mon, Apr 11, 2011 at 1:52 PM, Stephen Colebourne
> wrote:
>
>> I fixed the Map.Entry equals/hashCode compliance.
>>
>> I shortened the toString form to omit the class name, as it is
>> superfluous -> (A,B)
>>
>> Out library uses square bra
On Mon, Apr 11, 2011 at 1:52 PM, Stephen Colebourne wrote:
> I fixed the Map.Entry equals/hashCode compliance.
>
> I shortened the toString form to omit the class name, as it is
> superfluous -> (A,B)
>
> Out library uses square brackets, but I can live with round.
>
> I don't believe that requiri
On Mon, Apr 11, 2011 at 1:52 PM, Stephen Colebourne wrote:
> I fixed the Map.Entry equals/hashCode compliance.
>
> I shortened the toString form to omit the class name, as it is
> superfluous -> (A,B)
>
> Out library uses square brackets, but I can live with round.
>
> I don't believe that requiri
I fixed the Map.Entry equals/hashCode compliance.
I shortened the toString form to omit the class name, as it is
superfluous -> (A,B)
Out library uses square brackets, but I can live with round.
I don't believe that requiring every pair to carry around a format
string is viable. These must be sm
There is no aversion to customizing toString(). You said your choices
were subclassing, delegating, or convince the Commons community to
change the Pair class. If the Pair class isn't changed, then you're left
with the first two options. Personally, I prefer using the "has a"
pattern over the "
On Mon, Apr 11, 2011 at 12:19 PM, Adrian Crum <
adrian.c...@sandglass-software.com> wrote:
> Delegating is trivial in Eclipse - it will write the code for you. As for
> delegating versus "rolling your own" - delegating leverages the code
> maturity and unit tests of the delegate.
>
Roger that. Sp
Delegating is trivial in Eclipse - it will write the code for you. As
for delegating versus "rolling your own" - delegating leverages the code
maturity and unit tests of the delegate.
-Adrian
On 4/11/2011 9:16 AM, Gary Gregory wrote:
On Mon, Apr 11, 2011 at 10:12 AM, Matt Benson wrote:
On
On Mon, Apr 11, 2011 at 10:12 AM, Matt Benson wrote:
> On Mon, Apr 11, 2011 at 9: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
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 M
On Mon, Apr 11, 2011 at 10:14 AM, Matt Benson wrote:
> On Mon, Apr 11, 2011 at 9:06 AM, Gary Gregory
> wrote:
> > Also:
> >
> > Why go through this complicated code path:
> >
> > StringBuilder builder = new
> StringBuilder(ClassUtils.getShortClassName(this,
> > null));
> >
> > instead of the sim
On Mon, Apr 11, 2011 at 9:06 AM, Gary Gregory wrote:
> Also:
>
> Why go through this complicated code path:
>
> StringBuilder builder = new StringBuilder(ClassUtils.getShortClassName(this,
> null));
>
> instead of the simpler:
>
> StringBuilder builder = new StringBuilder(this.getClass().getSimple
On Mon, Apr 11, 2011 at 9: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 smel
Also:
Why go through this complicated code path:
StringBuilder builder = new StringBuilder(ClassUtils.getShortClassName(this,
null));
instead of the simpler:
StringBuilder builder = new StringBuilder(this.getClass().getSimpleName());
?
Thank you,
Gary
On Mon, Apr 11, 2011 at 10:00 AM, Gary G
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
30 matches
Mail list logo