I have a quick question about TreeSet collections and hashCode methods. I have a TreeSet and I\'m adding objects to it, before I add an object, I check to see i
You need to read Joshua Bloch's "Effective Java" chapter 3. It explains the equals contract and how to properly override equals, hashCode, and compareTo.