IntelliJ plugin for creating equals() and hashCode() methods in the Apache commons way.
Groovy Java
Switch branches/tags
Nothing to show
Latest commit 052caa6 Jan 19, 2013 @IvoNet IvoNet Updated the Readme

README.md

Introduction

An IntelliJ Plugin for generating equals and hashCode methods based on the commons-lang EqualsBuilder and HashCodeBuilder Builders.

See here for mor information.

This little plugin is loosly based of the equals and hasCode generator deluxe

It has been tested on IntelliJ 11 and 12 On Windows and Mac Operating Systems

Example

@Override
public int hashCode() {
    return new HashCodeBuilder().appendSuper(super.hashCode()).append(this.foo).append(this.bar)
                                .toHashCode();
}

@Override
public boolean equals(final Object obj) {
    if (obj == null) {
        return false;
    }
    if (getClass() != obj.getClass()) {
        return false;
    }
    final Foo other = (Foo) obj;
    return new EqualsBuilder().appendSuper(super.equals(obj)).append(this.foo, other.foo)
                              .append(this.bar, other.bar).isEquals();
}