Categories


Authors:
m.jedynak

Equals and HashCode Deluxe Generator

Products: IntelliJ IDEA

Vendor: Michal Jedynak

Email: m.jedynak [at] gmail.com

Website: https://github.com/mjedy...sHashCodeDeluxeGenerator

Bugtracker page

Generates equals() and hashCode() using Guava library or Objects class from Java 7. Usage:
  • ALT + INSERT -> equals() and hashCode() deluxe (inside Java Editor).
Downloads: 27440
Rating:
Participated in rating: 5
Version Compatible builds Date
1.0.12 133.193 28.03.2015 Download
1.0.7 129.354 28.09.2013 Download
1.0.5 107.105 04.02.2013 Download
10 updates are hidden show all updates

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)

Comments:

hansen.chris
Rated:
2015-01-01 03:46:19
Great plugin. Please use Objects.deepEquals() by default for arrays!
.
Anonymous
Rated:
2014-11-11 12:28:59
Nice. Would appreciate if it imported java.util.Objects out of the box when Java7 style was chosen.
.
Anonymous
Rated:
2014-03-11 23:58:10
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; }
.
peternortan
2013-12-19 19:13:17
nice one. Also check out http://muhammadkhojaye.blogspot.com/2010/02/java-hashing.html‎ for more comprehensive example.
.
Anonymous
Rated:
2013-08-03 01:43:44
Makes life a lot easier
.
virgo47
Rated:
2012-11-08 11:56:14
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.
.