Associates the specified value with the specified key in this map.
If the map previously contained a mapping for the key, the old
value is replaced.
@param key key with which the specified value is to be associated
@param value value to be associated with the specified key
@return the previous value associated with {@code key}, or
{@code null} if there was no mapping for {@code key}.
(A {@code null} return can also indicate that the map
previously associated {@code null} with {@code key}.)
@throws ClassCastException if the specified key cannot be compared
with the keys currently in the map
@throws NullPointerException if the specified key is null
and this map uses natural ordering, or its comparator
does not permit null keys
Associates the specified value with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced.
@param key key with which the specified value is to be associated @param value value to be associated with the specified key
@return the previous value associated with {@code key}, or {@code null} if there was no mapping for {@code key}. (A {@code null} return can also indicate that the map previously associated {@code null} with {@code key}.) @throws ClassCastException if the specified key cannot be compared with the keys currently in the map @throws NullPointerException if the specified key is null and this map uses natural ordering, or its comparator does not permit null keys