/** * Removes the key (and its corresponding value) from this map. * This method does nothing if the key is not in the map. * * @param key the key that needs to be removed * @return the previous value associated with {@code key}, or * {@code null} if there was no mapping for {@code key} * @throws NullPointerException if the specified key is null */ public V remove(final Object key) { return replaceNode(key, null, null); }
/** * Removes the key (and its corresponding value) from this map. * This method does nothing if the key is not in the map. * * @param key the key that needs to be removed * @return the previous value associated with {@code key}, or * {@code null} if there was no mapping for {@code key} * @throws NullPointerException if the specified key is null */ public V remove(final Object key) { return replaceNode(key, null, null); }
/** * {@inheritDoc} * * @throws NullPointerException if the specified key is null */ public boolean remove(final Object key, final Object value) { if (key == null) throw new NullPointerException(); return value != null && replaceNode(key, null, value) != null; }
/** * {@inheritDoc} * * @return the previous value associated with the specified key, * or {@code null} if there was no mapping for the key * @throws NullPointerException if the specified key or value is null */ public V replace(final K key, final V value) { if (key == null || value == null) throw new NullPointerException(); return replaceNode(key, value, null); }
public final void remove() { final Node<K, V> p; if ((p = lastReturned) == null) throw new IllegalStateException(); lastReturned = null; map.replaceNode(p.key, null, null); } }
/** * {@inheritDoc} * * @return the previous value associated with the specified key, * or {@code null} if there was no mapping for the key * @throws NullPointerException if the specified key or value is null */ public V replace(final K key, final V value) { if (key == null || value == null) throw new NullPointerException(); return replaceNode(key, value, null); }
/** * {@inheritDoc} * * @throws NullPointerException if any of the arguments are null */ public boolean replace(final K key, final V oldValue, final V newValue) { if (key == null || oldValue == null || newValue == null) throw new NullPointerException(); return replaceNode(key, newValue, oldValue) != null; }
/** * {@inheritDoc} * * @throws NullPointerException if any of the arguments are null */ public boolean replace(final K key, final V oldValue, final V newValue) { if (key == null || oldValue == null || newValue == null) throw new NullPointerException(); return replaceNode(key, newValue, oldValue) != null; }
/** * {@inheritDoc} * * @throws NullPointerException if the specified key is null */ public boolean remove(final Object key, final Object value) { if (key == null) throw new NullPointerException(); return value != null && replaceNode(key, null, value) != null; }
public final void remove() { final Node<K, V> p; if ((p = lastReturned) == null) throw new IllegalStateException(); lastReturned = null; map.replaceNode(p.key, null, null); } }
/** * Removes the key (and its corresponding value) from this map. * This method does nothing if the key is not in the map. * * @param key the key that needs to be removed * @return the previous value associated with {@code key}, or * {@code null} if there was no mapping for {@code key} * @throws NullPointerException if the specified key is null */ public V remove(final Object key) { return replaceNode(key, null, null); }
/** * {@inheritDoc} * * @return the previous value associated with the specified key, * or {@code null} if there was no mapping for the key * @throws NullPointerException if the specified key or value is null */ public V replace(final K key, final V value) { if (key == null || value == null) throw new NullPointerException(); return replaceNode(key, value, null); }
/** * {@inheritDoc} * * @throws NullPointerException if any of the arguments are null */ public boolean replace(final K key, final V oldValue, final V newValue) { if (key == null || oldValue == null || newValue == null) throw new NullPointerException(); return replaceNode(key, newValue, oldValue) != null; }
public final void remove() { final Node<K, V> p; if ((p = lastReturned) == null) throw new IllegalStateException(); lastReturned = null; map.replaceNode(p.key, null, null); } }
/** * {@inheritDoc} * * @throws NullPointerException if the specified key is null */ public boolean remove(final Object key, final Object value) { if (key == null) throw new NullPointerException(); return value != null && replaceNode(key, null, value) != null; }
/** * {@inheritDoc} * * @return the previous value associated with the specified key, * or {@code null} if there was no mapping for the key * @throws NullPointerException if the specified key or value is null */ public V replace(final K key, final V value) { if (key == null || value == null) throw new NullPointerException(); return replaceNode(key, value, null); }
/** * {@inheritDoc} * * @throws NullPointerException if any of the arguments are null */ public boolean replace(final K key, final V oldValue, final V newValue) { if (key == null || oldValue == null || newValue == null) throw new NullPointerException(); return replaceNode(key, newValue, oldValue) != null; }
/** * {@inheritDoc} * * @return the previous value associated with the specified key, * or {@code null} if there was no mapping for the key * @throws NullPointerException if the specified key or value is null */ public V replace(final K key, final V value) { if (key == null || value == null) throw new NullPointerException(); return replaceNode(key, value, null); }
/** * {@inheritDoc} * * @throws NullPointerException if any of the arguments are null */ public boolean replace(final K key, final V oldValue, final V newValue) { if (key == null || oldValue == null || newValue == null) throw new NullPointerException(); return replaceNode(key, newValue, oldValue) != null; }
/** * {@inheritDoc} * * @throws NullPointerException if the specified key is null */ public boolean remove(final Object key, final Object value) { if (key == null) throw new NullPointerException(); return value != null && replaceNode(key, null, value) != null; }