private void growTable ( ) { final int oldLength = states . length ; final int [ ] oldKeys = keys ; final float [ ] oldValues = values ; final byte [ ] oldStates = states ; final int newLength = RESIZE_MULTIPLIER * oldLength ; final int [ ] newKeys = new int [ newLength ] ; final float [ ] newValues = new float [ newLength ] ; final byte [ ] newStates = new byte [ newLength ] ; final int newMask = newLength - 1 ; for ( int i = 0 ; i < oldLength ; ++ i ) { if ( oldStates [ i ] == FULL ) { final int key = oldKeys [ i ] ; final int index = findInsertionIndex ( newKeys , newStates , key , newMask ) ; newKeys [ index ] = key ; newValues [ index ] = oldValues [ i ] ; newStates [ index ] = FULL ; } } mask = newMask ; keys = newKeys ; values = newValues ; states = newStates ; }
Grow the tables .