Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
The OrderedDictionary class implements an ordered dictionary.
Elements can be pushed/popped to/from the end of the list,
as while as shifted/unshifted to/from the beginning of the list.
length:uint
[read-only]
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
The length of the dictionary
Implementation public function get length():uint
orderedKeys:Array
[read-only]
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Gets the keys in the order stored.
Implementation public function get orderedKeys():Array
public function OrderedDictionary(weakKeys:Boolean = false)
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Constructor
Parameters weakKeys :Boolean
(default = false
)
— whether to use weak keys for the OrderedDictionary entries
public function clear():void
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Clears the dictionary of all entries.
public function getValue(key:Object):*
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Gets the value of the specified key.
Parameters
Returns *
— The value (null if the key doesn't exist)
public function getValueByIndex(index:int):*
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Get a value by index
Parameters
index :int
— index of the desired key/value pair
Returns public function isKeyValueMatch(key:Object, value:*):Boolean
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Returns true if the dictionary has a key that matches the specified key/value pair.
Parameters
key :Object
— The key
value :*
— The value
Returns Boolean
— true if the dictionary contains the key and matches the value.
public function keyExists(key:Object):Boolean
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Returns true if the dictionary has the specified key
Parameters
Returns Boolean
— true if the dictionary contains the key
The value of the key must be non-null)
public function pop():*
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Pops the last key/value pair from the end of the dictionary and returns its value
Returns public function push(key:Object, value:* = null):void
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Pushes the key/value pair onto the end of the dictionary
Parameters
key :Object
— The key
value :*
(default = null
)
— The value (if null, then the key is used as a value)
public function remove(key:Object):Boolean
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Removes a key/value from the dictionary
Parameters
Returns Boolean
— True if the key exists and the key/value was removed.
public function shift():*
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Shifts the first key/value pair from the beginning of the dictionary and returns its value
Returns public function unshift(key:Object, value:* = null):void
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Unshifts (inserts) the key/value pair at the beginning of the dictionary.
Parameters
key :Object
— The key
value :*
(default = null
)
— The value (if null, then the key is used as a value)
Copyright Adobe Systems Incorporated, all rights reserved, for internal use only Mon Apr 25 2011, 05:54 PM -07:00