This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Note: There is a bug in line 10 of your code. The method should have been named hashCode(), not hashcode(). Because it has the wrong name, it's not overriding hashCode() of class Object, and it will not be called.
You should use the @Override annotation to catch such mistakes:
And there is another bug, in line 15. You are comparing strings with == there. That does not work; use .equals() instead to compare strings.