private static < K , V > V putKeyValue ( K [ ] keys , V [ ] values , K key , V value ) { int pos = LinearProbing . getPosition ( keys , key ) ; if ( keys [ pos ] == null ) { keys [ pos ] = key ; values [ pos ] = value ; return null ; } // else V oldValue = values [ pos ] ; values [ pos ] = value ; return oldValue ; }
Associates the given key with the given value in the map defined by the keys and value arrays . If an entry with the key equal to the given one already exists in the map the value for this key will be overwritten with the given value .