See an example of converting a HashMap to Iterator:
Hashmap hashmap = queryform.getValue ();
Iterator it = hashmap.keyset (). Iterator ();
While (it.hasnext ()) {
String Key = (String) it.next ();
String value = (string) hashmap.get (key);
...
}
Itrator is just an interface. It is a traversal (thinking) method, can't make all container traversal to get a Method, because Container has a variety of Elements type, and you want to deal with these Elements during traversal