Equals and HashCode Deluxe Generator

Compatible with  IntelliJ IDEA
28.03.2015
34 127
Generates equals() and hashCode() using Guava library or Objects class from Java 7. Usage:
  • ALT + INSERT -> equals() and hashCode() deluxe (inside Java Editor).

Download plugin

Version

Update date

Recent change notes

version 1.0.12
version 1.0.11
version 1.0.10
version 1.0.9
version 1.0.8
version 1.0.7
  • Fixed bug with incorrect class name shown when asking about permission to delete existing equals/hashCode methods
version 1.0.6
version 1.0.5
  • Added ability to choose between Java 7 and Guava
version 1.0.4
  • Added comparison with base class fo subclasses in equals method
version 1.0.3
  • Fixed compatibility issue with IDEA 12
version 1.0.2
  • Tested against IDEA 10.5
version 1.0.1
  • Changed plugin name as slash character ('/') caused a bug with download link on JetBrains site.

General usage instructions

ALT + INSERT -> equals() and hashCode() deluxe (inside Java Editor)
01.01.2015
Great plugin. Please use Objects.deepEquals() by default for arrays!
Anonymous
11.11.2014
Nice. Would appreciate if it imported java.util.Objects out of the box when Java7 style was chosen.
Anonymous
11.03.2014
This is great, but is it possible to allow configuration of the style of the equals() method? I personally like to use the following concise style: public boolean equals(Object obj) { if (obj instanceof MyClass) { final MyClass that = (MyClass) obj; return equal(this.field1, that.field1) && equal(this.field2, that.field2) && equal(this.field3, that.field3); } return false; }
19.12.2013
nice one. Also check out http://muhammadkhojaye.blogspot.com/2010/02/java-hashing.html‎ for more comprehensive example.
Anonymous
03.08.2013
Makes life a lot easier
08.11.2012
Not bad and does what it should. However, the first dialog in the wizard should have select/unselect all in case one needs to base equals on a single id for instance. Also there is no customization in case you prefer something like: return this == obj || obj != null && getClass() == obj.getClass() && Objects.equal(getPrimaryKey(), ((ConfigData) obj).getPrimaryKey()); ...instead of typical ifs, braces, many lines, etc.
Please  sign in  to leave a comment.