Java examples for java.util:Map Operation
Returns an iterator for the hash map keys that is not changed by parallel changes to the hash map.
//package com.java2s; import java.util.HashMap; import java.util.Iterator; public class Main { /**/*from w ww. j av a2s.c o m*/ * Returns an iterator for the hash map keys that is not changed by parallel changes to the hash map. * * @param hashMap * @return */ public static Iterator getPersistentKeysIterator(HashMap hashMap) { return ((HashMap) hashMap.clone()).keySet().iterator(); } }