map.containsKey(key)
map.containsValue(val)
If you insist on iterating, do:
Iterator<Entry<String, String>>iterator=map.entrySet();
while(iterator.hasNext()){
final Entry<String, String>next=iterator.next();
next.getKey(); next.getValue();
}
Specified by: http://docs.oracle.com/javase/7/docs/api/java/util/Map.html