Confirmed users
596
edits
m (→API) |
|||
| Line 107: | Line 107: | ||
== KeyValueCollection == | == KeyValueCollection == | ||
A collection where entries have a key | A collection where entries have a key or label or index. | ||
Examples of subclasses: Array (key = index), Map | Examples of subclasses: Array (key = index), Map | ||
* Sets the value for |key| | * Sets the value for |key| | ||
* @param key | * @param key | ||
set : function(key, item) | set : function(key, item) | ||
* Gets the value for |key| | * Gets the value for |key| | ||
* If the key doesn't exist, returns |undefined|. | * If the key doesn't exist, returns |undefined|. | ||
* @param key | * @param key | ||
get : function(key) | get : function(key) | ||