I have a HashMap as below (assuming it has 10,0000 elements)
HashMap hm = new HashMap(); hm.put(\
HashMap hm = new HashMap();
hm.put(\
List yourElements = new ... // 10000000 for(Object O : yourElements) { if(myMap.get(O.key)==null) { myMap.put(O.key,O); } }