public V put ( K key , V value ) { int hashCode = hash ( ( key == null ) ? NULL : key ) ; int index = hashIndex ( hashCode , data . length ) ; HashEntry < K , V > entry = data [ index ] ; while ( entry != null ) { if ( entry . hashCode == hashCode && isEqualKey ( key , entry . getKey ( ) ) ) { V oldValue = entry . getValue ( ) ; updateEntry ( entry , value ) ; return oldValue ; } entry = entry . next ; } addMapping ( index , hashCode , key , value ) ; return null ; }
Puts a key - value mapping into this map .