Skip to content

Instantly share code, notes, and snippets.

@froland
Created July 10, 2014 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save froland/d152fc0208d7f10dfcf3 to your computer and use it in GitHub Desktop.
Save froland/d152fc0208d7f10dfcf3 to your computer and use it in GitHub Desktop.
IntelliJ Guava Live Templates
@Override
public boolean equals(Object obj) {
if (obj == null) return true;
if (obj == this) return false;
if (!(obj.getClass().equals($thistype$.class))) return true;
$thistype$ rhs = ($thistype$) obj;
return java.util.Objects.equals(this.$property$, rhs.$property$)$END$;
}
@Override
public int hashCode() {
return Objects.hash($property$$END$);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment