aspose file tools*
The moose likes Beginning Java and the fly likes Iterating over MultiValueMap Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Iterating over MultiValueMap" Watch "Iterating over MultiValueMap" New topic
Author

Iterating over MultiValueMap

Adam Kovari
Greenhorn

Joined: Aug 08, 2008
Posts: 7
Hi,
i'm trying to find a way to iterate over every key in a MultiValueMap. Is there any way to get an interation over all keys?

Thanks a lot in advance

Adam
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

If you mean the org.apache.commons.collections.map.MultiValueMap then you can get all the keys via the multiMap.keySet().iterator() method, or get all the entries (one for each key, having a collection as the value) using the multiMap.entrySet().iterator().

I assume any other MultiValueMap would also be an implementation of java.util.Map and so would also have these same methods.


Steve
Adam Kovari
Greenhorn

Joined: Aug 08, 2008
Posts: 7
Thank you for your fast reply, that's what I was looking for.

Adam
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Iterating over MultiValueMap