@SuppressWarnings("unchecked") void poll() { Entry<K, V> toRemove; while ((toRemove = (Entry<K, V>) referenceQueue.poll()) != null) { removeEntry(toRemove); } }
/** * Removes the mapping with the specified key from this map. * * @param key * the key of the mapping to remove. * @return the value of the removed mapping or {@code null} if no mapping * for the specified key was found. */ @Override public V remove(Object key) { poll(); int index = 0; Entry<K, V> entry, last = null; if (key != null) { index = (Collections.secondaryHash(key) & 0x7FFFFFFF) % elementData.length; entry = elementData[index]; while (entry != null && !key.equals(entry.get())) { last = entry; entry = entry.next; } } else { entry = elementData[0]; while (entry != null && !entry.isNull) { last = entry; entry = entry.next; } } if (entry != null) { modCount++; if (last == null) {
@SuppressWarnings("unchecked") void poll() { Entry<K, V> toRemove; while ((toRemove = (Entry<K, V>) referenceQueue.poll()) != null) { removeEntry(toRemove); } }
@SuppressWarnings("unchecked") void poll() { Entry<K, V> toRemove; while ((toRemove = (Entry<K, V>) referenceQueue.poll()) != null) { removeEntry(toRemove); } }
@SuppressWarnings("unchecked") void poll() { Entry<K, V> toRemove; while ((toRemove = (Entry<K, V>) referenceQueue.poll()) != null) { removeEntry(toRemove); } }
@SuppressWarnings("unchecked") void poll() { Entry<K, V> toRemove; while ((toRemove = (Entry<K, V>) referenceQueue.poll()) != null) { removeEntry(toRemove); } }
@SuppressWarnings("unchecked") void poll() { Entry<K, V> toRemove; while ((toRemove = (Entry<K, V>) referenceQueue.poll()) != null) { removeEntry(toRemove); } }
@SuppressWarnings("unchecked") void poll() { Entry<K, V> toRemove; while ((toRemove = (Entry<K, V>) referenceQueue.poll()) != null) { removeEntry(toRemove); } }
@SuppressWarnings("unchecked") void poll() { Entry<K, V> toRemove; while ((toRemove = (Entry<K, V>) referenceQueue.poll()) != null) { removeEntry(toRemove); } }
/** * Removes the mapping with the specified key from this map. * * @param key * the key of the mapping to remove. * @return the value of the removed mapping or {@code null} if no mapping * for the specified key was found. */ @Override public V remove(Object key) { poll(); int index = 0; Entry<K, V> entry, last = null; if (key != null) { index = (Collections.secondaryHash(key) & 0x7FFFFFFF) % elementData.length; entry = elementData[index]; while (entry != null && !key.equals(entry.get())) { last = entry; entry = entry.next; } } else { entry = elementData[0]; while (entry != null && !entry.isNull) { last = entry; entry = entry.next; } } if (entry != null) { modCount++; if (last == null) {
/** * Removes the mapping with the specified key from this map. * * @param key * the key of the mapping to remove. * @return the value of the removed mapping or {@code null} if no mapping * for the specified key was found. */ @Override public V remove(Object key) { poll(); int index = 0; Entry<K, V> entry, last = null; if (key != null) { index = (Collections.secondaryHash(key) & 0x7FFFFFFF) % elementData.length; entry = elementData[index]; while (entry != null && !key.equals(entry.get())) { last = entry; entry = entry.next; } } else { entry = elementData[0]; while (entry != null && !entry.isNull) { last = entry; entry = entry.next; } } if (entry != null) { modCount++; if (last == null) {
/** * Removes the mapping with the specified key from this map. * * @param key * the key of the mapping to remove. * @return the value of the removed mapping or {@code null} if no mapping * for the specified key was found. */ @Override public V remove(Object key) { poll(); int index = 0; Entry<K, V> entry, last = null; if (key != null) { index = (Collections.secondaryHash(key) & 0x7FFFFFFF) % elementData.length; entry = elementData[index]; while (entry != null && !key.equals(entry.get())) { last = entry; entry = entry.next; } } else { entry = elementData[0]; while (entry != null && !entry.isNull) { last = entry; entry = entry.next; } } if (entry != null) { modCount++; if (last == null) {
/** * Removes the mapping with the specified key from this map. * * @param key * the key of the mapping to remove. * @return the value of the removed mapping or {@code null} if no mapping * for the specified key was found. */ @Override public V remove(Object key) { poll(); int index = 0; Entry<K, V> entry, last = null; if (key != null) { index = (Collections.secondaryHash(key) & 0x7FFFFFFF) % elementData.length; entry = elementData[index]; while (entry != null && !key.equals(entry.get())) { last = entry; entry = entry.next; } } else { entry = elementData[0]; while (entry != null && !entry.isNull) { last = entry; entry = entry.next; } } if (entry != null) { modCount++; if (last == null) {
/** * Removes the mapping with the specified key from this map. * * @param key * the key of the mapping to remove. * @return the value of the removed mapping or {@code null} if no mapping * for the specified key was found. */ @Override public V remove(Object key) { poll(); int index = 0; Entry<K, V> entry, last = null; if (key != null) { index = (Collections.secondaryHash(key) & 0x7FFFFFFF) % elementData.length; entry = elementData[index]; while (entry != null && !key.equals(entry.get())) { last = entry; entry = entry.next; } } else { entry = elementData[0]; while (entry != null && !entry.isNull) { last = entry; entry = entry.next; } } if (entry != null) { modCount++; if (last == null) {
/** * Removes the mapping with the specified key from this map. * * @param key * the key of the mapping to remove. * @return the value of the removed mapping or {@code null} if no mapping * for the specified key was found. */ @Override public V remove(Object key) { poll(); int index = 0; Entry<K, V> entry, last = null; if (key != null) { index = (Collections.secondaryHash(key) & 0x7FFFFFFF) % elementData.length; entry = elementData[index]; while (entry != null && !key.equals(entry.get())) { last = entry; entry = entry.next; } } else { entry = elementData[0]; while (entry != null && !entry.isNull) { last = entry; entry = entry.next; } } if (entry != null) { modCount++; if (last == null) {
/** * Removes the mapping with the specified key from this map. * * @param key * the key of the mapping to remove. * @return the value of the removed mapping or {@code null} if no mapping * for the specified key was found. */ @Override public V remove(Object key) { poll(); int index = 0; Entry<K, V> entry, last = null; if (key != null) { index = (Collections.secondaryHash(key) & 0x7FFFFFFF) % elementData.length; entry = elementData[index]; while (entry != null && !key.equals(entry.get())) { last = entry; entry = entry.next; } } else { entry = elementData[0]; while (entry != null && !entry.isNull) { last = entry; entry = entry.next; } } if (entry != null) { modCount++; if (last == null) {