Packageweavejs.util
Classpublic class Dictionary2D
InheritanceDictionary2D Inheritance Object

This is a wrapper for a 2-dimensional Map.



Public Properties
 PropertyDefined By
  map : Object
The primary Map object.
Dictionary2D
Public Methods
 MethodDefined By
  
Dictionary2D(weakPrimaryKeys:Boolean = false, weakSecondaryKeys:Boolean = false, defaultType:Class = null)
Dictionary2D
  
forEach(key1_key2_value:Function, thisArg:Object):void
Iterates over pairs of keys and corresponding values.
Dictionary2D
  
get(key1:Object, key2:Object):*
Dictionary2D
  
primaryKeys():Array
Dictionary2D
  
remove(key1:Object, key2:Object):*
This removes a value associated with the given primary and secondary keys.
Dictionary2D
  
removeAllPrimary(key1:Object):void
This removes all values associated with the given primary key.
Dictionary2D
  
secondaryKeys(key1:Object):Array
Dictionary2D
  
set(key1:Object, key2:Object, value:Object):void
This will add or replace an entry in the map.
Dictionary2D
Property Detail
mapproperty
public var map:Object

The primary Map object.

Constructor Detail
Dictionary2D()Constructor
public function Dictionary2D(weakPrimaryKeys:Boolean = false, weakSecondaryKeys:Boolean = false, defaultType:Class = null)



Parameters
weakPrimaryKeys:Boolean (default = false)
 
weakSecondaryKeys:Boolean (default = false)
 
defaultType:Class (default = null)
Method Detail
forEach()method
public function forEach(key1_key2_value:Function, thisArg:Object):void

Iterates over pairs of keys and corresponding values.

Parameters

key1_key2_value:Function — A function which may return true to stop iterating.
 
thisArg:Object — The 'this' argument for the function.

get()method 
public function get(key1:Object, key2:Object):*

Parameters

key1:Object — The first map key.
 
key2:Object — The second map key.

Returns
* — The value.
primaryKeys()method 
public function primaryKeys():Array

Returns
Array
remove()method 
public function remove(key1:Object, key2:Object):*

This removes a value associated with the given primary and secondary keys.

Parameters

key1:Object — The first dictionary key.
 
key2:Object — The second dictionary key.

Returns
* — The value that was in the dictionary.
removeAllPrimary()method 
public function removeAllPrimary(key1:Object):void

This removes all values associated with the given primary key.

Parameters

key1:Object — The first dictionary key.

secondaryKeys()method 
public function secondaryKeys(key1:Object):Array

Parameters

key1:Object

Returns
Array
set()method 
public function set(key1:Object, key2:Object, value:Object):void

This will add or replace an entry in the map.

Parameters

key1:Object — The first map key.
 
key2:Object — The second map key.
 
value:Object — The value.