setValue
public java.lang.Object setValue(java.lang.Object value)
Set the value of this entry. Note: In an entrySet or
entrySet.iterator), unless you can guarantee lack of concurrent
modification, setValue is not strictly guaranteed to
actually replace the value field obtained via the get
operation of the underlying hash table in multithreaded
applications. If iterator-wide synchronization is not used,
and any other concurrent put or remove
operations occur, sometimes even to other entries,
then this change is not guaranteed to be reflected in the hash
table. (It might, or it might not. There are no assurances
either way.)
- Specified by:
setValue
in interface java.util.Map.Entry
- Parameters:
value
- the new value.
- Returns:
- the previous value, or null if entry has been detectably
removed.
- Throws:
java.lang.NullPointerException
- if the value is null
.