public void put ( TransactionLocal key , Object value ) { // We don't use a fast path as with get() because it is at // least as common to use set() to create new entries as // it is to replace existing ones, in which case, a fast // path would fail more often than not. Entry [ ] tab = table ; int len = tab . length ; int i = key . hashCode & ( len - 1 ) ; for ( Entry e = tab [ i ] ; e != null ; e = tab [ i = nextIndex ( i , len ) ] ) { if ( e . key == key ) { e . value = value ; return ; } } tab [ i ] = new Entry ( key , value ) ; int sz = ++ size ; if ( sz >= threshold ) rehash ( ) ; }
Set the value associated with key .