Collections.Map.Concurrent.replace()
Signature
Object replace ( Object map ,Object key ,Object value )
Description
Replace entry for key only if currently mapped to some value. The action is performed atomically.
Parameters
Name | Type | Description |
map | Object | The concurrent map object |
key | Object | key with which the specified value is to be associated. |
value | Object | value to be associated with the specified key. |
Returns
Type | Description |
Object | Returns an object which is the previously associated value with the key If the key doesnot exist then returns null |