Packagecom.ericfeminella.collections
Interfacepublic interface IMap
ImplementorsHashMap, LocalPersistenceMap, ResourceMap

Defines the contract for lightweight HashMap implementations which are to expose an API into a managed collection of key value pairs



Public Methods
 MethodDefined by
  
clear():void
Clears all key / values defined in the HashMap instance
IMap
  
clearAllExcept(key:*):void
Clears all key / values defined in the HashMap instance with the exception of the specified key
IMap
  
containsKey(key:*):Boolean
Determines if a key exists in the HashMap instance
IMap
  
containsValue(value:*):Boolean
Determines if a value exists in the HashMap instance
IMap
  
getEntries():IList
getEntries() returns all key/value pairs in as an IList of HashMapEntry objects implementation.
IMap
  
getKey(value:*):*
Returns a key value from the HashMap instance
IMap
  
getKeys():Array
Returns each key added to the HashMap instance
IMap
  
getValue(key:*):*
Returns a key value from the HashMap instance
IMap
  
getValues():Array
Returns each value assigned to each key in the HashMap instance
IMap
  
isEmpty():Boolean
Determines if the HashMap instance is empty
IMap
  
put(key:*, value:*):void
Adds a key / value pair to the current Map
IMap
  
putAll(table:Dictionary):void
[new] putAll places all name / value pairs defined in an Object or Dictionary instance into the IMap instance.
IMap
  
putEntry(entry:IHashMapEntry):void
[new] putEntry is intended as a pseudo-overloaded put implementation whereby clients may call putEntry to pass an IHashMapEntry implementation.
IMap
  
remove(key:*):void
Removes a key / value from the HashMap instance
IMap
  
reset():void
Resets all key value assignments in the HashMap instance to null
IMap
  
resetAllExcept(key:*):void
Resets all key / values defined in the HashMap instance to null
IMap
  
size():int
Retrieves the size of the HashMap instance
IMap
Method detail
clear()method
public function clear():void

Clears all key / values defined in the HashMap instance

clearAllExcept()method 
public function clearAllExcept(key:*):void

Clears all key / values defined in the HashMap instance with the exception of the specified key

Parameters
key:*
containsKey()method 
public function containsKey(key:*):Boolean

Determines if a key exists in the HashMap instance

Parameters
key:* — the key in which to determine existance in the map

Returns
Boolean — true if the key exisits, false if not
containsValue()method 
public function containsValue(value:*):Boolean

Determines if a value exists in the HashMap instance

Parameters
value:* — the value in which to determine existance in the map

Returns
Boolean — true if the value exisits, false if not
getEntries()method 
public function getEntries():IList

returns an IList of HashMapEntry objects.

Returns
IList
getKey()method 
public function getKey(value:*):*

Returns a key value from the HashMap instance

Parameters
value:* — the key in which to retrieve the value of

Returns
String — the value of the specified key
getKeys()method 
public function getKeys():Array

Returns each key added to the HashMap instance

Returns
Array — String Array of key identifiers
getValue()method 
public function getValue(key:*):*

Returns a key value from the HashMap instance

Parameters
key:* — the key in which to retrieve the value of

Returns
* — the value of the specified key
getValues()method 
public function getValues():Array

Returns each value assigned to each key in the HashMap instance

Returns
Array — Array of values assigned for all keys in the map
isEmpty()method 
public function isEmpty():Boolean

Determines if the HashMap instance is empty

Returns
Boolean — true if the current map is empty, false if not
put()method 
public function put(key:*, value:*):void

Adds a key / value pair to the current Map

Parameters
key:* — key to add to the map
 
value:* — value of the specified key
putAll()method 
public function putAll(table:Dictionary):void

Places all name / value pairs into the current IMap instance.

Parameters
table:DictionaryObject of name / value pairs
putEntry()method 
public function putEntry(entry:IHashMapEntry):void

adds an IHashMapEntry object to the map.

Parameters
entry:IHashMapEntryIHashMapEntry implementation
remove()method 
public function remove(key:*):void

Removes a key / value from the HashMap instance

Parameters
key:* — key to remove from the map
reset()method 
public function reset():void

Resets all key value assignments in the HashMap instance to null

resetAllExcept()method 
public function resetAllExcept(key:*):void

Resets all key / values defined in the HashMap instance to null

Parameters
key:*
size()method 
public function size():int

Retrieves the size of the HashMap instance

Returns
int — the current size of the map instance