Skip to content

Commit

Permalink
ALWAYS IMPLEMENT .hashCode() if its gonna be in a map
Browse files Browse the repository at this point in the history
  • Loading branch information
comp500 committed Aug 11, 2019
1 parent 7946377 commit d21668a
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ public boolean equals(Object obj) {
return false;
}

@Override
public int hashCode() {
return u.hashCode();
}

@Override
public int compareTo(SpaceSafeURI uri) {
return u.compareTo(uri.u);
Expand Down

0 comments on commit d21668a

Please sign in to comment.