| Package | com.threerings.util.maps |
| Class | public class HashMap |
| Inheritance | HashMap com.threerings.util.maps.AbstractMap |
| Implements | Map |
| Method | Defined by | ||
|---|---|---|---|
|
HashMap(loadFactor:Number = 1.75)
Construct a HashMap
| HashMap | ||
|
clear():void
Clear this map, removing all stored elements.
| HashMap | ||
|
containsKey(key:Object):Boolean
Returns true if the specified key exists in the map.
| HashMap | ||
|
forEach(fn:Function):void
Call the specified function to iterate over the mappings in this Map.
| HashMap | ||
|
get(key:Object):*
| HashMap | ||
|
keys():Array
Return all the unique keys in this Map, in Array form.
| HashMap | ||
|
put(key:Object, value:Object):*
Store a value in the map associated with the specified key.
| HashMap | ||
|
remove(key:Object):*
Removes the mapping for the specified key.
| HashMap | ||
|
values():Array
Return all the values in this Map, in Array form.
| HashMap | ||
| HashMap | () | constructor |
public function HashMap(loadFactor:Number = 1.75)Construct a HashMap
ParametersloadFactor:Number (default = 1.75) — - A measure of how full the hashtable is allowed to
get before it is automatically resized. The default
value of 1.75 should be fine.
|
| clear | () | method |
public function clear():voidClear this map, removing all stored elements.
| containsKey | () | method |
public function containsKey(key:Object):BooleanReturns 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():ArrayReturn 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():ArrayReturn 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 |