Skip to content

Problem: can't freely use std collections#7

Open
meoyawn wants to merge 1 commit intojkovacs:masterfrom
meoyawn:equals
Open

Problem: can't freely use std collections#7
meoyawn wants to merge 1 commit intojkovacs:masterfrom
meoyawn:equals

Conversation

@meoyawn
Copy link
Copy Markdown
Contributor

@meoyawn meoyawn commented Oct 30, 2016

Solution: equals + hashcode

@Override
public int hashCode() {
int result = artist != null ? artist.hashCode() : 0;
result = 31 * result + (artistMbid != null ? artistMbid.hashCode() : 0);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets avoid magic numbers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants