Packageorg.pranaframework.collections
Interfacepublic interface IMap
ImplementorsMap

An object that contains key/value pairs. It cannot contain duplicate keys and each key can only contain one correspoding value.



Public Properties
 PropertyDefined by
  size : uint
[read-only] Returns the number of key/value pairs in the map.
IMap
  values : Array
[read-only] Returns an array of all values in the map.
IMap
Public Methods
 MethodDefined by
  
clear():void
Removes all key/value pairs from the map.
IMap
  
get(key:Object):*
Returns the value in the map associated with the specified key.
IMap
  
put(key:Object, value:Object):void
Adds an object to the map and associates it with the specified key.
IMap
  
remove(key:Object):*
Removes the mapping for this key from this map if it is present.
IMap
Property detail
sizeproperty
size:uint  [read-only]

Returns the number of key/value pairs in the map.

Implementation
    public function get size():uint
valuesproperty 
values:Array  [read-only]

Returns an array of all values in the map. If no values exist in the map, then an empty Array instance will be returned.

Implementation
    public function get values():Array
Method detail
clear()method
public function clear():void

Removes all key/value pairs from the map.

get()method 
public function get(key:Object):*

Returns the value in the map associated with the specified key.

Parameters
key:Object

Returns
*
put()method 
public function put(key:Object, value:Object):void

Adds an object to the map and associates it with the specified key.

Parameters
key:Object
 
value:Object
remove()method 
public function remove(key:Object):*

Removes the mapping for this key from this map if it is present. Returns the value to which the map previously associated the key, or null if the map contained no mapping for this key. (A null return can also indicate that the map previously associated null with the specified key if the implementation supports null values.) The map will not contain a mapping for the specified key once the call returns.

Parameters
key:Object — the key whose mapping is to be removed from the map

Returns
* — previous value associated with specified key, or null if there was no mapping for key