public float putAndGet ( final int key , final float value ) { int index = findInsertionIndex ( key ) ; float previous = missingEntries ; boolean newMapping = true ; if ( index < 0 ) { index = changeIndexSign ( index ) ; previous = values [ index ] ; newMapping = false ; } keys [ index ] = key ; states [ index ] = FULL ; values [ index ] = value ; if ( newMapping ) { ++ size ; if ( shouldGrowTable ( ) ) { growTable ( ) ; } ++ count ; } return previous ; }
Put a value associated with a key in the map .