Skip to content

Instantly share code, notes, and snippets.

@rbe
Created September 26, 2012 09:31
Show Gist options
  • Save rbe/3787021 to your computer and use it in GitHub Desktop.
Save rbe/3787021 to your computer and use it in GitHub Desktop.

Revisions

  1. rbe created this gist Sep 26, 2012.
    12 changes: 12 additions & 0 deletions user_entity_equals.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    @Override
    public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    OdiseeUser that = (OdiseeUser) o;

    if (emailAddress != null ? !emailAddress.equals(that.emailAddress) : that.emailAddress != null) return false;
    if (id != null ? !id.equals(that.id) : that.id != null) return false;
    if (!username.equals(that.username)) return false;
    return true;
    }