Collections.Map.Concurrent.replace()

Signature

Object replace ( Object map ,Object key ,Object value )

Domain

ACTION

Description

Replace entry for key only if currently mapped to some value. The action is performed atomically.

Parameters

NameTypeDescription
mapObjectThe concurrent map object
keyObjectkey with which the specified value is to be associated.
valueObjectvalue to be associated with the specified key.

Returns

TypeDescription
Objecttrue if the value was replaced, false otherwise .

Cautions

none