question: protected void rehash ( int newCapacity ) { int oldCapacity = _set . length ; K oldKeys [ ] = ( K [ ] ) _set ; int oldVals [ ] = _values ; _set = new Object [ newCapacity ] ; Arrays . fill ( _set , FREE ) ; _values = new int [ newCapacity ] ; for ( int i = oldCapacity ; i -- > 0 ; ) { if ( oldKeys [ i ] != FREE && oldKeys [ i ] != REMOVED ) { K o = oldKeys [ i ] ; int index = insertionIndex ( o ) ; if ( index < 0 ) { throwObjectContractViolation ( _set [ ( - index - 1 ) ] , o ) ; } _set [ index ] = o ; _values [ index ] = oldVals [ i ] ; } } }
target:  rehashes the map to the new capacity.