You can also create your own java.util.Comparator implementation that
never returns 0 for two "different" keys. In your example, you would
have to break the ties by 1st comparing the desired attribute(s) that
you want to order by and then some unique attribute - you might want to
add it to the
Hello,
I want to add few products to the SortedSet and sort them by price. I
add four different elements to TreeSet:
["salt",0.5$], ["milk", 1$], ["bread", 1$], ["bananas", 2$]
But at the end my TreeSet contains only three elements:
["salt",0.5$], ["bread", 1$], ["bananas", 2$]
The "bread" re