Package | com.threerings.util.maps |
Class | public class DictionaryMap |
Inheritance | DictionaryMap ![]() |
Implements | Map |
Method | Defined 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 |
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.
Parameterskey:Object |
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.
fn:Function |
get | () | method |
public function get(key:Object):*
Parameters
key:Object |
* |
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.
ReturnsArray |
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.
Parameterskey:Object |
|
value:Object |
* |
remove | () | method |
public function remove(key:Object):*
Removes the mapping for the specified key. Returns the value that had been stored, or undefined.
Parameterskey:Object |
* |
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.
ReturnsArray |