HashMap.containsValue - What's the point?

Posted by Frederik on Stack Overflow See other posts from Stack Overflow or by Frederik
Published on 2010-03-29T13:03:02Z Indexed on 2010/03/29 13:13 UTC
Read the original article Hit count: 104

Filed under:
|

I've got a HashMap and I need to fetch an item by its integer value. I notice there's a containsValue() function, but it would appear I still have to iterate through the map to find the correct index anyway.

My question is; why use containsValue() if I'm required to traverse it afterwards?

Also, am I missing the point completely? ;-)

© Stack Overflow or respective owner

Related posts about java

Related posts about hashmap