| Package | as3.collections |
| Class | public class Map |
| Inheritance | Map TypedDictionary |
| Implements | IMap |
The Map is actually only a public name of the TypedDictionary from that it inherits the entire implementation.
An exception will be thrown for any trial to add a key, that does not match with the type of the internal TypedDictionary instance. In other words, adding keys of a consistent type will not cause any exception. See the head section of the TypedDictionary for more information.
Runtime of operationsSee also
| Method | Defined by | ||
|---|---|---|---|
![]() |
addItem(key:*, item:*):Boolean
Adds a new item to the map.
| TypedDictionary | |
![]() |
clear():void
Removes all items from the collection.
| TypedDictionary | |
![]() |
getItem(key:*):*
Returns the item associated with the given key.
| TypedDictionary | |
![]() |
getIterator(cursor:uint = 0):IIterator
Returns an iterator over the map items starting at the specified position.
| TypedDictionary | |
![]() |
getKeyIterator(cursor:uint = 0):IIterator
Returns an iterator over the map keys starting at the specified position.
| TypedDictionary | |
![]() |
getMapIterator(cursor:uint = 0):IMapIterator
Returns a map iterator, which provides additionally access to the key of
the last returned item.
| TypedDictionary | |
![]() |
hasKey(key:*):Boolean
Tests, if the map contains an item for the given key.
| TypedDictionary | |
![]() |
keysToArray():Array
Returns an array of all keys.
| TypedDictionary | |
![]() |
removeKey(key:*):*
Removes the key and the item associated with that key.
| TypedDictionary | |
![]() |
replaceItem(key:*, item:*):Boolean
Replaces the item associated with the given key.
| TypedDictionary | |
![]() |
toArray():Array
Returns an array of all items in the order of the particular collection.
| TypedDictionary | |
|
toString():String
Info
| Map | ||