Skip to content

Instantly share code, notes, and snippets.

@ryanmr
Created March 25, 2015 17:35
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 ryanmr/37315eb3e261ab2e84d6 to your computer and use it in GitHub Desktop.
Save ryanmr/37315eb3e261ab2e84d6 to your computer and use it in GitHub Desktop.
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Course other = (Course) obj;
if (credits != other.credits)
return false;
if (level != other.level)
return false;
if (major != other.major)
return false;
if (name == null) {
if (other.name != null)
return false;
} else if (!name.equals(other.name))
return false;
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment