Packagecom.threerings.util.maps
Classpublic class DictionaryMap
InheritanceDictionaryMap Inheritance com.threerings.util.maps.AbstractMap
ImplementsMap

An implemention of Map that uses a Dictionary internally for storage. Any Object (and null) may be used as a key with no loss in efficiency.



Public Methods
 MethodDefined by
  
clear():void
Clear this map, removing all stored elements.
DictionaryMap
  
containsKey(key:Object):Boolean
Returns true if the specified key exists in the map.
DictionaryMap
  
forEach(fn:Function):void
Call the specified function to iterate over the mappings in this Map.
DictionaryMap
  
get(key:Object):*
DictionaryMap
  
keys():Array
Return all the unique keys in this Map, in Array form.
DictionaryMap
  
put(key:Object, value:Object):*
Store a value in the map associated with the specified key.
DictionaryMap
  
remove(key:Object):*
Removes the mapping for the specified key.
DictionaryMap
  
values():Array
Return all the values in this Map, in Array form.
DictionaryMap
Method detail
clear()method
public function clear():void

Clear this map, removing all stored elements.

containsKey()method 
public function containsKey(key:Object):Boolean

Returns true if the specified key exists in the map.

Parameters
key:Object

Returns
Boolean
forEach()method 
public function forEach(fn:Function):void

Call the specified function to iterate over the mappings in this Map. Signature: function (key :Object, value :Object) :void or function (key :Object, value :Object) :Boolean If you return a Boolean, you may return true to indicate that you've found what you were looking for, and halt iteration.

Parameters
fn:Function
get()method 
public function get(key:Object):*

Parameters
key:Object

Returns
*
keys()method 
public function keys():Array

Return all the unique keys in this Map, in Array form. The Array is not a 'view': it can be modified without disturbing the Map from whence it came.

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

Store a value in the map associated with the specified key. Returns the previous value stored for that key, or undefined.

Parameters
key:Object
 
value:Object

Returns
*
remove()method 
public function remove(key:Object):*

Removes the mapping for the specified key. Returns the value that had been stored, or undefined.

Parameters
key:Object

Returns
*
values()method 
public function values():Array

Return all the values in this Map, in Array form. The Array is not a 'view': it can be modified without disturbing the Map from whence it came.

Returns
Array