/** * Removes the given entry from the Map. * * @param pEntry the entry to be removed * * @return the removed entry, or {@code null} if nothing was removed. */ protected Entry<K, V> removeEntry(Entry<K, V> pEntry) { if (pEntry == null) { return null; } // Find candidate entry for this key Entry<K, V> candidate = getEntry(pEntry.getKey()); if (candidate == pEntry || (candidate != null && candidate.equals(pEntry))) { // Remove remove(pEntry.getKey()); return pEntry; } return null; }
/** * Removes the given entry from the Map. * * @param pEntry the entry to be removed * * @return the removed entry, or {@code null} if nothing was removed. */ protected Entry<K, V> removeEntry(Entry<K, V> pEntry) { if (pEntry == null) { return null; } // Find candidate entry for this key Entry<K, V> candidate = getEntry(pEntry.getKey()); if (candidate == pEntry || (candidate != null && candidate.equals(pEntry))) { // Remove remove(pEntry.getKey()); return pEntry; } return null; }
/** * Removes the given entry from the Map. * * @param pEntry the entry to be removed * * @return the removed entry, or {@code null} if nothing was removed. */ protected Entry<K, V> removeEntry(Entry<K, V> pEntry) { if (pEntry == null) { return null; } // Find candidate entry for this key Entry<K, V> candidate = getEntry(pEntry.getKey()); if (candidate == pEntry || (candidate != null && candidate.equals(pEntry))) { // Remove remove(pEntry.getKey()); return pEntry; } return null; }
/** * Removes the given entry from the Map. * * @param pEntry the entry to be removed * * @return the removed entry, or {@code null} if nothing was removed. */ protected Entry<K, V> removeEntry(Entry<K, V> pEntry) { if (pEntry == null) { return null; } // Find candidate entry for this key Entry<K, V> candidate = getEntry(pEntry.getKey()); if (candidate == pEntry || (candidate != null && candidate.equals(pEntry))) { // Remove remove(pEntry.getKey()); return pEntry; } return null; }