| Package | flash.utils |
| Class | public dynamic class Dictionary |
| Inheritance | Dictionary Object |
===) for key comparison. When an object is used as a key the object's
identity is used to lookup the object and not the value returned from calling toString() on it.
So:
var dict = new Dictionary();
var obj = new Object();
var key:Object = new Object();
key.toString = function() { return "key" }
dict[key] = "Letters";
obj["key"] = "Letters";
dict[key] == "Letters" // true
obj["key"] == "Letters" // true
obj[key] == "Letters" // true because key == "key" is true b/c key.toString == "key"
dict["key"] == "Letters" // false because "key" === key is false
See also
| === (strict equality) |
| Function | Defined by | ||
|---|---|---|---|
|
Dictionary(weakKeys:Boolean = false)
Creates a new Dictionary object.
| Dictionary | ||
![]() |
Indicates whether an object has a specified property defined.
| Object | |
![]() |
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter.
| Object | |
![]() |
Indicates whether the specified property exists and is enumerable.
| Object | |
![]() |
Sets the availability of a dynamic property for loop operations.
| Object | |
![]() |
Returns the string representation of the specified object.
| Object | |
![]() |
Returns the primitive value of the specified object.
| Object | |
public function Dictionary(weakKeys:Boolean = false)
weakKeys:Boolean (default = false) — Instructs the Dictionary instance to use "weak" references on object keys.
If the only reference to an object is in the specified Dictionary, the key will be eligible for
garbage collection and will be removed from the table when the object is collected.
|
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/labs/flashauthoringpreview/flash/utils/Dictionary.html