Breadcrumbs

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.

Unknown Attachment

aKey

Key value identifying the map entry.

anotherObject

The object to replace the map entry with.

Examples


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


classAdress.png

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




icon_download_example.png

<your example path>\E2E Action Language\map\uml\mapBenchmark.xml