The following tables shows some map task and their implementation with Action Script and JavaScript.
Task | Action Script / JavaScript | Additional Information |
---|---|---|
Creating a new map | create myMap; | |
let myMap = new Base_Components_Basic_Behavior_Map_Map(); | ||
Building a map from an array | set myMap = myArray.buildMap("name"); | See buildMap map for more. |
let myMap = new Base_Components_Basic_Behavior_Map_Map(myArray, "name");
| ||
Retrieving an item from a map | set anObject = myMap.getMapValue("my key"); | See getMapValue for more. |
let value = myMap.getEntry('my key'); | ||
Getting map entries | set anArray = myMap.getMapEntries(); | See getMapEntries for more. |
let mapEntries = myMap.getEntries(); | ||
Adding a new element to a map | set anObject = myMap.setMapValue("my key", "my value"); |
See setMapValue for more. |
myMap.setEntry('my key', 'my value'); | ||
Removing an item from a map | set deletedObject = myMap.removeMapValue("my key"); | See removeMapValue for more. |
let removed = myMap.removeEntry('my key'); |