Map.put

Associates the specified value with the specified key in this map (optional operation). If the map previously contained a mapping for the key, the old value is replaced by the specified value. (A map <tt>m</tt> is said to contain a mapping for a key <tt>k</tt> if and only if {@link #containsKey(Object) m.containsKey(k)} would return <tt>true</tt>.)

@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 <tt>key</tt>, or <tt>null</tt> if there was no mapping for <tt>key</tt>. (A <tt>null</tt> return can also indicate that the map previously associated <tt>null</tt> with <tt>key</tt>, if the implementation supports <tt>null</tt> values.) @throws UnsupportedOperationException if the <tt>put</tt> operation is not supported by this map @throws ClassCastException if the class of the specified key or value prevents it from being stored in this map @throws NullPointerException if the specified key or value is null and this map does not permit null keys or values @throws IllegalArgumentException if some property of the specified key or value prevents it from being stored in this map

interface Map(K, V)
V
put
(
K key
,)

Meta