@ GuardedBy ( "this" ) private void rehashIfNeeded ( ) { int currentSize = table . length ; if ( currentSize - count >= currentSize / ( MAX_EXPECTED_COLLISION_COUNT + 1 ) ) { // Still enough overhead. return ; } Object [ ] oldTable = table ; // Grow the table so it increases by 1 / GROWTH_DENOMINATOR. int newSize = currentSize + currentSize / GROWTH_DENOMINATOR ; table = new Object [ newSize ] ; count = 0 ; for ( Object element : oldTable ) { if ( element != null ) { intern ( element ) ; } } }
Doubles the table size .