MultiHashMap - won't give the values back.
I have this MultiHashMap:
Map<String, String> map= new MultiHashMap();
But now I can't seem to get the keys and values out of the HashMap.
map.getKey();
Then I get the error:
The method getKey() is undefined for the type Map<String,String>
So how do I get de values out of this HashMap then?
Re: MultiHashMap - won't give the values back.
I now made this for it:
Code :
for (String key : map.keySet()) {
for (String value : map.values()) {
if (Match.equals(key)) {
System.out.println(key + value);
}
}
}
The only thing is, it returns all the values in the complete map.
And I only want the values for a certain key.
Re: MultiHashMap - won't give the values back.
I changed the String, String to String, Object.
Now it works. :)