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 <[email protected]> wrote:

> On 22 October 2013 18:10, Gary Gregory <[email protected]> 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-Mail: [email protected] | [email protected]
> > Java Persistence with Hibernate, Second Edition<
> http://www.manning.com/bauer3/>
> > JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> > Spring Batch in Action <http://www.manning.com/templier/>
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Cheers,
Paul

Reply via email to