I created an object HashSet, and the value is an object (Triple) which is my own class. But I get a strange thing, when there are two equal objects on my HashSet, is it poss
You didn't override equals and hashCode in your class properly. Here's how to write it and test it :
http://java.sun.com/developer/Books/effectivejava/Chapter3.pdf