@Override
    public V remove(final Object key) {
        final Iterator<Map.Entry<K, V>> iterator = entries.iterator();
        V lastValue = null;

        while (iterator.hasNext()) {
            final Map.Entry<K, V> entry = iterator.next();
            lastValue = entry.getValue();

            if (key.equals(entry.getKey())) {
                iterator.remove();
            }
        }

        return lastValue;
    }
@Override
    public V remove(final Object key) {
        final Iterator<Map.Entry<K, V>> iterator = entries.iterator();
        V lastValue = null;

        while (iterator.hasNext()) {
            final Map.Entry<K, V> entry = iterator.next();
            lastValue = entry.getValue();

            if (key.equals(entry.getKey())) {
                iterator.remove();
            }
        }

        return lastValue;
    }
@ Override public V remove ( final Object key ) { final Iterator < Map . Entry < K , V > > iterator = entries . iterator ( ) ; V lastValue = null ; while ( iterator . hasNext ( ) ) { final Map . Entry < K , V > entry = iterator . next ( ) ; lastValue = entry . getValue ( ) ; if ( key . equals ( entry . getKey ( ) ) ) { iterator . remove ( ) ; } } return lastValue ; }
Remove all entries for the given key
@param key The key
@return Some value that was paired with the key. The exact value is indeterminate
Remove all entries for the given key