@ 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