Packagecom.addicted2flash.util
Interfacepublic interface IMap extends IDisposable
ImplementorsHashMap

An object that maps keys to values. A map cannot contain duplicate keys; each key can map to at most one value.



Public Methods
 MethodDefined by
  
clear():void
Removes all of the mappings from this map (optional operation).
IMap
  
Returns a copy of the IMap.
IMap
  
containsKey(key:*):Boolean
Returns true if this map contains a mapping for the specified key.
IMap
  
containsValue(value:*):Boolean
Returns true if this map maps one or more keys to the specified value.
IMap
 Inherited
dispose():void
free memory for garbage collection.
IDisposable
  
Returns a Set view of the mappings contained in this map.
IMap
  
getValue(key:*):*
Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
IMap
  
isEmpty():Boolean
Returns true if this map contains no key-value mappings.
IMap
  
Returns a Set view of the keys contained in this map.
IMap
  
put(key:*, value:*):*
Associates the specified value with the specified key in this map (optional operation).
IMap
  
remove(key:*):*
Removes the mapping for a key from this map if it is present (optional operation).
IMap
  
size():int
Returns the number of key-value mappings in this map.
IMap
  
Returns a Collection view of the values contained in this map.
IMap
Method detail
clear()method
public function clear():void

Removes all of the mappings from this map (optional operation). The map will be empty after this call returns.

clone()method 
public function clone():IMap

Returns a copy of the IMap.

Returns
IMap — a copy of the IMap
containsKey()method 
public function containsKey(key:*):Boolean

Returns true if this map contains a mapping for the specified key.

Parameters
key:* — key whose presence in this map is to be tested

Returns
Boolean — true if this map contains a mapping for the specified key
containsValue()method 
public function containsValue(value:*):Boolean

Returns true if this map maps one or more keys to the specified value.

Parameters
value:* — value whose presence in this map is to be tested

Returns
Boolean — true if this map maps one or more keys to the specified value
entrySet()method 
public function entrySet():ISet

Returns a Set view of the mappings contained in this map. The set is backed by the map, so changes to the map are reflected in the set, and vice-versa.

NOTE: Entry objects removed with an IIterator are not removed from the IMap.

Returns
ISet — a set view of the Entry objects contained in this map
getValue()method 
public function getValue(key:*):*

Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.

Parameters
key:* — the key whose associated value is to be returned

Returns
* — the value to which the specified key is mapped, or null if this map contains no mapping for the key
isEmpty()method 
public function isEmpty():Boolean

Returns true if this map contains no key-value mappings.

Returns
Boolean — true if this map contains no key-value mappings
keySet()method 
public function keySet():ISet

Returns a Set view of the keys contained in this map. The set is backed by the map, so changes to the map are reflected in the set, and vice-versa.

NOTE: keys removed with an IIterator are not removed from the IMap.

Returns
ISet — a set view of the keys contained in this map
put()method 
public function put(key:*, value:*):*

Associates the specified value with the specified key in this map (optional operation). If the map previously contained a mapping for the key, the old value is replaced by the specified value

Parameters
key:* — key with which the specified value is to be associated
 
value:* — value to be associated with the specified key

Returns
* — the previous value associated with key, or null if there was no mapping for key
remove()method 
public function remove(key:*):*

Removes the mapping for a key from this map if it is present (optional operation). Returns the value to which this map previously associated the key, or null if the map contained no mapping for the key.

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

Returns
* — the previous value associated with key, or null if there was no mapping for key
size()method 
public function size():int

Returns the number of key-value mappings in this map.

Returns
int — the number of key-value mappings in this map
values()method 
public function values():ICollection

Returns a Collection view of the values contained in this map. The collection is backed by the map, so changes to the map are reflected in the collection, and vice-versa.

NOTE: values removed with an IIterator are not removed from the IMap.

Returns
ICollection — a collection view of the values contained in this map