question: V removeE ( Map < K , V > m , Object key , int hash , Object value , HashEntry < K , V > header ) throws PageException { lock ( ) ; try { int c = count - 1 ; HashEntry < K , V > [ ] tab = table ; int index = hash & ( tab . length - 1 ) ; HashEntry < K , V > first = tab [ index ] ; HashEntry < K , V > e = first ; while ( e != null && ( e . hash != hash || ! key . equals ( e . key ) ) ) e = e . next ; if ( e != null ) { if ( value == null || value . equals ( e . value ) ) { e . recordRemoval ( header ) ; ++ modCount ; HashEntry < K , V > newFirst = e . next ; for ( HashEntry < K , V > p = first ; p != e ; p = p . next ) newFirst = p . clone ( newFirst , header ) ; tab [ index ] = newFirst ; count = c ; return e . value ; } } throw AbstractMapPro . invalidKey ( m , key , true ) ; } finally { unlock ( ) ; } }
target:  Remove; match on key only if value null, else match both.