dcsimg
Comparing string id in a HashMap
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   K_Michaels
Posted On:   Thursday, August 30, 2001 10:12 AM

I have a method that is taking an id and checking to see whether or not it is in a HashMap. How do I do that?

Re: Comparing string id in a HashMap

Posted By:   josh_knowles  
Posted On:   Thursday, August 30, 2001 10:30 AM

You can use either
containsKey(String key)
or
containsValue(String value)
methods of HashMap.

Both return a boolean if the object is in the HashMap.



~josh
About | Sitemap | Contact