Java tutorial
//package com.java2s; import java.util.Iterator; import java.util.concurrent.ConcurrentHashMap; public class Main { public static <T1, T2> void removeHashMapElementByHash(ConcurrentHashMap<T1, T2> target, int hashcode) { Iterator<T1> iter = target.keySet().iterator(); Object key = null; while (iter.hasNext()) { key = iter.next(); if (key.hashCode() == hashcode) { target.remove(key); } } } }