| Package | alternativa.types |
| Class | public dynamic class Map |
| Inheritance | Map flash.utils.Dictionary |
| Property | Defined by | ||
|---|---|---|---|
| length : uint [read-only] Get quantity of map elements.
| Map | ||
| Method | Defined by | ||
|---|---|---|---|
|
Map(weakKeys:Boolean = false)
Create an instance of class.
| Map | ||
|
add(key:*, value:*):void
Add a key-value pair.
| Map | ||
|
any():*
Get any object.
| Map | ||
|
clear():void
Clear all map objects.
| Map | ||
|
Clone map.
| Map | ||
|
Add map.
| Map | ||
|
hasKey(key:*):Boolean
Check for the map key.
| Map | ||
|
hasValue(value:*):Boolean
Value existence check.
| Map | ||
|
isEmpty():Boolean
Check map on elements' existence
| Map | ||
|
isSingle():Boolean
Check if map has the only element.
| Map | ||
|
peek():*
Get some map object.
| Map | ||
|
remove(key:*):void
Delete object by the key.
| Map | ||
|
take():*
Get some map object and delete it.
| Map | ||
|
toArray(numeric:Boolean = false):Array
Create new array based on map.
| Map | ||
|
Transfer to a set.
| Map | ||
|
toString():String
String representation of the map.
| Map | ||
| length | property |
length:uint [read-only]Get quantity of map elements.
Implementation public function get length():uint
| Map | () | constructor |
public function Map(weakKeys:Boolean = false)Create an instance of class.
ParametersweakKeys:Boolean (default = false) — if parameter is set to true, weak keys will be used |
| add | () | method |
public function add(key:*, value:*):voidAdd a key-value pair. If the given key already exits, the new value will be set.
Parameterskey:* — key |
|
value:* — value |
| any | () | method |
public function any():*Get any object.
Returns* — any object of the map |
| clear | () | method |
public function clear():voidClear all map objects.
| clone | () | method |
| concat | () | method |
| hasKey | () | method |
public function hasKey(key:*):BooleanCheck for the map key.
Parameterskey:* — the key that is being added |
Boolean — true if the map contains specified key or false otherwise |
| hasValue | () | method |
public function hasValue(value:*):BooleanValue existence check.
Parametersvalue:* — value which is being checked for existence |
Boolean — true if the map contains an element equal to value, |
| isEmpty | () | method |
public function isEmpty():BooleanCheck map on elements' existence
ReturnsBoolean — true if there is no elements in the map, false otherwise |
| isSingle | () | method |
public function isSingle():BooleanCheck if map has the only element.
ReturnsBoolean — true if there is only element in the map, false otherwise |
| peek | () | method |
public function peek():*Get some map object.
Returns* — a value from the map |
| remove | () | method |
public function remove(key:*):voidDelete object by the key.
Parameterskey:* — key |
| take | () | method |
public function take():*Get some map object and delete it.
Returns* — a value from the map |
| toArray | () | method |
public function toArray(numeric:Boolean = false):ArrayCreate new array based on map.
Parametersnumeric:Boolean (default = false) — if paramener is set to true, the map will be transferred to an indexed array, otherwise to an associative array with string keys |
Array — a new array containing all values from the map |
| toSet | () | method |
public function toSet(weakKeys:Boolean = false):SetTransfer to a set.
ParametersweakKeys:Boolean (default = false) — weak keys flag for a new set |
Set — a set containig all values of the map |
| toString | () | method |
public function toString():StringString representation of the map.
ReturnsString — a string representation of the map |