boolean () { while (hashIterator.hasNext()) { Map.Entry<KeyReference<K>, V> ent = hashIterator.next(); KeyReference<K> wk = ent.getKey(); K k = null; if (wk != null && (k = wk.get()) == null) { /* Weak key has been cleared by GC */ continue; } next = new RefEntry<>(ent, k); return true; } return false; }