src/main/java/org/jivesoftware/smack/util/collections/AbstractHashedMap.java
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;
    }
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;
    }
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.

@param key
the key to add
@param value
the value to add
@return the value previously mapped to this key, null if none
Puts a key - value mapping into this map .