void () { for (Iterator<Entry<String, Object>> I = myPriceTable.entrySet().iterator(); I.hasNext(); ) { Entry<String, Object> entry = I.next(); if (entry.getValue() instanceof Consumer) { I.remove(); } } }