wood burning stoves*
The moose likes Java in General and the fly likes Without Key can we retrieve particular value in hashmap Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Without Key can we retrieve particular value in hashmap" Watch "Without Key can we retrieve particular value in hashmap" New topic
Author

Without Key can we retrieve particular value in hashmap

Rajendra Prakash
Ranch Hand

Joined: Sep 10, 2009
Posts: 293
Without knowing key can we retrieve particular value in hashmap. Is it possible or not
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
Check out the Map.entrySet() and Map.values() methods; those provide access to all values without having to provide a key.
Rajendra Prakash
Ranch Hand

Joined: Sep 10, 2009
Posts: 293
i know how to get all values. so no way to retrieve particular value without knowing the key.
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
What makes a value "particular" if not the key?
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4167
    
  21

If you know the value you want, and you can get all values, then you can get all values and iterate until you get the particular value you want.


Steve
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Without Key can we retrieve particular value in hashmap
 
Similar Threads
retrieve HashMap - key, value
HashMap Duplicate Element Problem
LDAP
How can we access objects in a Hash Map?
Question on HashMap