So I really like eclipse's ability to write code for me, especially the really boring stuff that no one should have to write, but their way of doing hashCode and equals is pretty messy looking. Apache Commons has some tools to clean it up but it doesn't make it quite as easy to have eclipse generate it for you. But, here is a template that should make life a little easier.
As a reminder you add templates by Window -> Preferences -> Java -> Editor -> Templates then clikc on the 'New' button
More info can be found here
No comments:
Post a Comment