Iterators on arraylist and hashmap