859 |
|
* @param key key with which the specified value is to be associated. |
860 |
|
* @param value value to be associated with the specified key. |
861 |
|
* @return previous value associated with specified key, or <tt>null</tt> |
862 |
< |
* if there was no mapping for key. A <tt>null</tt> return can |
863 |
< |
* also indicate that the map previously associated <tt>null</tt> |
864 |
< |
* with the specified key, if the implementation supports |
865 |
< |
* <tt>null</tt> values. |
866 |
< |
* |
867 |
< |
* @throws ClassCastException if the class of the specified key or value |
868 |
< |
* prevents it from being stored in this map. |
862 |
> |
* if there was no mapping for key. |
863 |
|
* @throws NullPointerException if the specified key or value is |
864 |
|
* <tt>null</tt>. |
865 |
< |
* |
872 |
< |
**/ |
865 |
> |
*/ |
866 |
|
public V putIfAbsent(K key, V value) { |
867 |
|
if (value == null) |
868 |
|
throw new NullPointerException(); |