V remove(Object key,int hash,Object value){
  lock();
  try {
    int c=cnt - 1;
    HE<K,V>[] tab=table;
    int index=hash & (tab.length - 1);
    HE<K,V> first=tab[index];
    HE<K,V> e=first;
    while (e != null && (e.hash != hash || !key.equals(e.k)))     e=e.next;
    V oldValue=null;
    if (e != null) {
      V v=e.v;
      if (value == null || value.equals(v)) {
        oldValue=v;
        ++modCnt;
        HE<K,V> newFirst=e.next;
        for (HE<K,V> p=first; p != e; p=p.next)         newFirst=new HE<K,V>(p.k,p.hash,newFirst,p.v);
        tab[index]=newFirst;
        cnt=c;
      }
    }
    return oldValue;
  }
  finally {
    unlock();
  }
}

V remove ( Object key , int hash , Object value ) { lock ( ) ; try { int c = cnt - 1 ; HE < K , V > [ ] tab = table ; int index = hash & ( tab . length - 1 ) ; HE < K , V > first = tab [ index ] ; HE < K , V > e = first ; while ( e != null && ( e . hash != hash || ! key . equals ( e . k ) ) ) e = e . next ; V oldValue = null ; if ( e != null ) { V v = e . v ; if ( value == null || value . equals ( v ) ) { oldValue = v ; ++ modCnt ; HE < K , V > newFirst = e . next ; for ( HE < K , V > p = first ; p != e ; p = p . next ) newFirst = new HE < K , V > ( p . k , p . hash , newFirst , p . v ) ; tab [ index ] = newFirst ; cnt = c ; } } return oldValue ; } finally { unlock ( ) ; } }
remove ; match on key only if value null , else match both .
