File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Iterating over MultiValueMap" Watch "Iterating over MultiValueMap" New topic

Iterating over MultiValueMap

Adam Kovari

Joined: Aug 08, 2008
Posts: 7
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

Steve Luke

Joined: Jan 28, 2003
Posts: 4181

If you mean the 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.

Adam Kovari

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

I agree. Here's the link:
subject: Iterating over MultiValueMap
It's not a secret anymore!