Displaying posts tagged with

“compareto”

Feb
16
2010

Google Objects.equal, useful but be careful.

Google have a nice equals method to make boiler plate equals easier to read. Particularly good if you have many attributes in the method. http://publicobject.com/2007/09/coding-in-small-with-google-collections_8175.html
Be careful to check that your objects are consistent with equals though.  I have mentioned this before.

Oct
24
2009

IDE Generation of equals methods has its moments

This blog entry looks at the code generated by Eclipse and Netbeans and demonstrates why its a good idea to both test the code and review it thoroughly.