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 m
Let me reframe this question for Frederik:
Well, containsValue(), does it compare internally (its input parameter) with every "value" in the hashmap? Or does it uses somehow hashcodeing (or other technique) to generate the result? For the former case, we could simply use an iterator to traverse and match the existence of our value with all the hashmap's "value". The significance of the question is in the performance, or speed!