Basically the HashMap and HashSet use the hashcode method to determine the placement of the object on the hash, whereas the others use Comparators to determine their order for sorted Collections. It is not to say that you can't change the hash method to get the sort you actually wanted, but it is using the method for the wrong purpose. With a hashcode method, you want the most evenly dispursed code to come out so that the hash tree isn't lop-sided.
So say you have objects in your
lawn and you want to spread them around evenly, so that one part of the lawn isn't over loaded with lots of objects and therefore kills all your grass in that area. Plus, it will be easy to grab one object, if you don't have to go hunting through a huge pile in one area of your lawn, because that is where you piled everything upon.
Now a Comparator and sorting is different, you just want to have it is a particular order all the time, there isn't a care for putting everything in one area. If you are sorting by alphabet, and there happens to be a lot of "A" words, then you want them in correct order, and don't care that there are a lot of "A"s.
Hope that helps clarify things.
Mark