If you add your values to a HashMap, as you know, you have to specify a key and a value, and the HashMap takes the hashCode of the key to decide where to put the value. So unless you have keys which return different hashCodes from one another, you are going to find the values mixed up together.
I can't offhand think of a Collection type which will separate values like that; have a look in the
Collections part of the Java tutorial and see whether that helps. You could subdivide a Collection by index, but that fixes its size and vitiates the benefit of Collection classes altoghether.
Does anybody else know of a collection which can be subdivided like that?