GitHub - tushar/ApacheCommonsEqualsHashcode: IntelliJ plugin for creating equals() and hashCode() methods in the Apache commons way. · GitHub
Skip to content

About

IntelliJ plugin for creating equals() and hashCode() methods in the Apache commons way.

Resources

Stars

0 stars

Watchers

1 watching

Forks

 
 

Latest commit

 

History

17 Commits

Folders and files

Repository files navigation

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();
}

About

IntelliJ plugin for creating equals() and hashCode() methods in the Apache commons way.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors