Skip to main content
Skip table of contents

setMapValue() Operation

Syntax

set anObject = map.setMapValue(aKey, anotherObject)

Semantics

Within map map replace the object of the map entry identified by akey with anotherObject. The operation returns the old content (being replaced). If the addressed key does not exists, the item is appended to the map.

Substitutables

anObject

optional: The map entry being replaced. 

map

An object of type Map.

aKey

Key value identifying the map entry.

anotherObject

The object to replace the map entry with.

Examples

NONE
create oldAddress;
  
create newAddress;
set newAddress.street = "99, Kings Road";
set newAddress.town = "London";
  
set oldAddress = hashMap.setMapValue("John Snow", newAddress);

oldAddress and newAddress are objects of type Address. name is the key of the map:

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.