Re: [lang] ImmutablePair is final

2013-10-23 Thread Gary Gregory
> > > > > > > > > > > > > > > > > > > > > >> > > > > >> Matt > > > > >> > > > > >> > > > > >> On Tue, Oct 22, 2013 at 2:29 PM, Gary Gregory < > >

Re: [lang] ImmutablePair is final

2013-10-23 Thread Paul Benedict
t; > > > >> Matt > > > >> > > > >> > > > >> On Tue, Oct 22, 2013 at 2:29 PM, Gary Gregory < > garydgreg...@gmail.com > > > >> >wrote: > > > >> > > > >> > > > > >> > >

Re: [lang] ImmutablePair is final

2013-10-23 Thread Duncan Jones
t;> >wrote: > > >> > > >> > > > >> > > > >> > > > >> > Sent via the Samsung Galaxy Note® 3, an AT&T 4G LTE smartphone > > >> > > > >> > Original message > > >&

Re: [lang] ImmutablePair is final

2013-10-22 Thread Gary Gregory
>> > > >> > Sent via the Samsung Galaxy Note® 3, an AT&T 4G LTE smartphone > >> > > >> > Original message > >> > From: sebb > >> > Date:10/22/2013 13:37 (GMT-05:00) > >> > To: Commons Developers List >

Re: [lang] ImmutablePair is final

2013-10-22 Thread Duncan Jones
ory > >wrote: >> >> > >> > >> > >> > Sent via the Samsung Galaxy Note® 3, an AT&T 4G LTE smartphone >> > >> > ---- Original message >> > From: sebb >> > Date:10/22/2013 13:37 (GMT-05:00) >> >

Re: [lang] ImmutablePair is final

2013-10-22 Thread Gary Gregory
>wrote: > > > > > > > > > Sent via the Samsung Galaxy Note® 3, an AT&T 4G LTE smartphone > > > > Original message > > From: sebb > > Date:10/22/2013 13:37 (GMT-05:00) > > To: Commons Developers List > > Subject:

Re: [lang] ImmutablePair is final

2013-10-22 Thread Matt Benson
/2013 13:37 (GMT-05:00) > To: Commons Developers List > Subject: Re: [lang] ImmutablePair is final > > On 22 October 2013 18:33, Gary Gregory wrote: > > On Tue, Oct 22, 2013 at 1:22 PM, Paul Benedict > wrote: > > > >> If you can subclass, the class will likely be m

Re: [lang] ImmutablePair is final

2013-10-22 Thread Gary Gregory
Sent via the Samsung Galaxy Note® 3, an AT&T 4G LTE smartphone Original message From: sebb Date:10/22/2013 13:37 (GMT-05:00) To: Commons Developers List Subject: Re: [lang] ImmutablePair is final On 22 October 2013 18:33, Gary Gregory wrote: > On Tue, Oct 22, 20

Re: [lang] ImmutablePair is final

2013-10-22 Thread James Ring
FTFY: Any reason we would want to keep ImmutablePair? On Tue, Oct 22, 2013 at 10:10 AM, Gary Gregory wrote: > Hi All: > > Is there any reason we would want to keep ImmutablePair final? > > Gary > > -- > E-Mail: garydgreg...@gmail.com | ggreg...@apache.org > Java Persistence with Hibernate, Second

Re: [lang] ImmutablePair is final

2013-10-22 Thread Matt Benson
On Tue, Oct 22, 2013 at 12:33 PM, Gary Gregory wrote: > On Tue, Oct 22, 2013 at 1:22 PM, Paul Benedict > wrote: > > > If you can subclass, the class will likely be mutable somehow (accessing > > protected or package-private data?) -- even introducing new variables > > exclusive to the subclass. T

Re: [lang] ImmutablePair is final

2013-10-22 Thread sebb
On 22 October 2013 18:33, Gary Gregory wrote: > On Tue, Oct 22, 2013 at 1:22 PM, Paul Benedict wrote: > >> If you can subclass, the class will likely be mutable somehow (accessing >> protected or package-private data?) -- even introducing new variables >> exclusive to the subclass. The "final" ke

Re: [lang] ImmutablePair is final

2013-10-22 Thread Gary Gregory
On Tue, Oct 22, 2013 at 1:22 PM, Paul Benedict wrote: > If you can subclass, the class will likely be mutable somehow (accessing > protected or package-private data?) -- even introducing new variables > exclusive to the subclass. The "final" keyword is used well here. > Here is my use case for w

Re: [lang] ImmutablePair is final

2013-10-22 Thread sebb
On 22 October 2013 18:21, Matt Benson wrote: > Here's the thread where the issue was discussed before: > > http://markmail.org/thread/fcbesctp6ifxtecs > > As for the public fields, it was originally my intent that any Pair be > immutable, and my take on final fields is that there is no reason not

Re: [lang] ImmutablePair is final

2013-10-22 Thread Paul Benedict
If you can subclass, the class will likely be mutable somehow (accessing protected or package-private data?) -- even introducing new variables exclusive to the subclass. The "final" keyword is used well here. On Tue, Oct 22, 2013 at 12:15 PM, sebb wrote: > On 22 October 2013 18:10, Gary Gregory

Re: [lang] ImmutablePair is final

2013-10-22 Thread Matt Benson
Here's the thread where the issue was discussed before: http://markmail.org/thread/fcbesctp6ifxtecs As for the public fields, it was originally my intent that any Pair be immutable, and my take on final fields is that there is no reason not to make them public, particularly if, as in the case of

Re: [lang] ImmutablePair is final

2013-10-22 Thread sebb
On 22 October 2013 18:10, Gary Gregory wrote: > Hi All: > > Is there any reason we would want to keep ImmutablePair final? To stop mutable subclasses from being created? BTW, it's unfortunate that the fields are public; they should have been private (there are public getters). > Gary > > -- > E

[lang] ImmutablePair is final

2013-10-22 Thread Gary Gregory
Hi All: Is there any reason we would want to keep ImmutablePair final? Gary -- E-Mail: garydgreg...@gmail.com | ggreg...@apache.org Java Persistence with Hibernate, Second Edition JUnit in Action, Second Edition Spring Batch in