|
![](/i/fill.gif) |
On 10/04/2012 01:10 PM, Invisible wrote:
> OK, so only 14 lines of actually new code. The hashCode() override is
> not /strictly/ necessary, but the IDE whines like hell if you don't, and
> it's highly likely that you're going to put variables as keys into a
> HashMap at some point, in which case hashCode() had better work correctly!
Also, the IDE complains if you don't write "@Override" in front of every
method that overrides an inherited one. I don't know why. (And I'm not
actually sure how that's valid Java syntax, come to mention it...)
This /does/ have the nice side-effect that if you rename the method in
the superclass or something, the IDE starts yelling "hey, this says
@Override, but it doesn't!"
Post a reply to this message
|
![](/i/fill.gif) |