new Map( [valueType])
Creates a new Map specifying the type of the value.
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
valueType |
function | Object |
<optional> |
Item's value type constructor |
Extends
Methods
-
clear()
-
Removes all entries from the map.
-
getFirst()
-
Gets the value of the first entry in the map.
Returns:
the value of the first entry.
- Type
- olympe.df.Proxy.<T> | T
-
getFirstKey()
-
Gets the key for the first entry in the collection.
Returns:
the number of key-value mappings in this map
- Type
- olympe.df.Proxy.<string> | string
-
remove(key)
-
Removes a specific entry from the map.
Parameters:
Name Type Description key
string key whose mapping is to be removed from the map
Returns:
the previous value associated with key, or undefined if there was no mapping for key.
- Type
- T | undefined
-
set(key, value)
-
Adds a key-value pair to the map. If the key was already present, the new value replaces the existing one.
Parameters:
Name Type Description key
string key with which the specified value is to be associated
value
T value to be associated with the specified key
-
setValueType(valueType)
-
Sets the type of the objects that can be stored in this map.
Parameters:
Name Type Description valueType
function Value type constructor.