protected final Bucket < K , V > getBucketForKey ( K key ) { int bucket_index = ( key . hashCode ( ) & 0x7FFFFFFF ) % buckets . length ; Bucket < K , V > thebucket = buckets [ bucket_index ] ; if ( thebucket == null ) { synchronized ( this ) { thebucket = buckets [ bucket_index ] ; if ( thebucket == null ) { thebucket = new Bucket < K , V > ( ) ; buckets [ bucket_index ] = thebucket ; } // if } // sync } // if return thebucket ; }
Returns the bucket which the specified key hashes to