Object _remove(Object key,int hash,Object value,Object defaultValue){
  lock();
  try {
    int c=count - 1;
    HashEntry<V>[] tab=table;
    int index=hash & (tab.length - 1);
    HashEntry<V> first=tab[index];
    HashEntry<V> e=first;
    while (e != null && (e.hash != hash || !key.equals(e.key)))     e=e.next;
    if (e == null)     return defaultValue;
    V v=e.value;
    if ((value == null && v == null) || value.equals(v)) {
      ++modCount;
      HashEntry<V> newFirst=e.next;
      for (HashEntry<V> p=first; p != e; p=p.next)       newFirst=new HashEntry<V>(p.key,p.hash,newFirst,p.value);
      tab[index]=newFirst;
      count=c;
      return v;
    }
    return defaultValue;
  }
  finally {
    unlock();
  }
}

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