View Single Post
  #3 (permalink)  
Old 03-29-2008, 11:25 PM
markus-sukram markus-sukram is offline
Member
 
Join Date: Mar 2008
Posts: 5
markus-sukram is on a distinguished road
Thanks for the reply, but I'm not sure I folllow.

"v1 must be covered by v2.sothat you can only obtain v2 if you use the method map.get(k1) once more"

What is meant by covered?

"you could't get all values int a HashMap,but only get the lasted value through map.get(k). "

I have realised that the get method only returns the object that was inserted last in the collision. Are you saying it's not possible? I highly doubt that, it would make the HashMap a useless datastructure.
I have tried to iterate through my whole HashMap, but it gives only the one object value in the collision and carries on to the next key. I must be missing something, I'm hoping somebody can point me in the right direction here.
Reply With Quote