| Package | net.guttershark.util.collections |
| Class | public final class OrderedDictionary |
| Inheritance | OrderedDictionary flash.utils.Proxy |
var od:OrderedDictionary = new OrderedDictionary();
od['test0'] = "foo";
od['test1'] = "bar";
od.push("test3","doe");
trace(od['test1']);
trace(od['test3']);
trace(od.pop());
var i:int = 0;
var l:int = od.length;
for(i;i<l;i++)
{
trace(od[i]);
}
| Property | Defined by | ||
|---|---|---|---|
| length : int [read-only]
A non-negative integer specifying the number of elements in the ordered dictionary.
| OrderedDictionary | ||
| Method | Defined by | ||
|---|---|---|---|
|
OrderedDictionary(weakKeys:Boolean = false)
Constructor for OrderedDictionary instances.
| OrderedDictionary | ||
|
clone(weakKeys:Boolean = false):OrderedDictionary
Clone this OrderedDictionary.
| OrderedDictionary | ||
|
dispose():void
Dispose of this ordered dictionary.
| OrderedDictionary | ||
|
pop():*
Removes the last element from an ordered dictionary and returns the value of that element.
| OrderedDictionary | ||
|
push(name:*, value:*):int
Adds one or more elements to the end of an ordered dictionary and returns the new length of the array.
| OrderedDictionary | ||
|
shift():*
Removes the first element from an ordered dictionary and returns that element.
| OrderedDictionary | ||
|
splice(startIndex:int, deleteCount:int):OrderedDictionary
Remove multiple items from the ordered dictionary.
| OrderedDictionary | ||
|
spliceByKeys(... keys):OrderedDictionary
Remove objects by multiple keys.
| OrderedDictionary | ||
|
unshift(name:*, value:*):int
Adds one or more elements to the beginning of an ordered dictionary and returns the new length of the array.
| OrderedDictionary | ||
| length | property |
length:int [read-only]A non-negative integer specifying the number of elements in the ordered dictionary.
Implementation public function get length():int
| OrderedDictionary | () | constructor |
public function OrderedDictionary(weakKeys:Boolean = false)Constructor for OrderedDictionary instances.
ParametersweakKeys:Boolean (default = false) — Whether or not the dictionary's keys are weak references to objects.
|
| clone | () | method |
public function clone(weakKeys:Boolean = false):OrderedDictionaryClone this OrderedDictionary.
ParametersweakKeys:Boolean (default = false) — Whether or not the new dictionary will have weak references to it's objects.
|
OrderedDictionary |
| dispose | () | method |
public function dispose():voidDispose of this ordered dictionary.
| pop | () | method |
public function pop():*Removes the last element from an ordered dictionary and returns the value of that element.
Returns* |
| push | () | method |
public function push(name:*, value:*):intAdds one or more elements to the end of an ordered dictionary and returns the new length of the array.
Parametersname:* — The key identifier.
|
|
value:* — The value to store.
|
int |
| shift | () | method |
public function shift():*Removes the first element from an ordered dictionary and returns that element.
Returns* |
| splice | () | method |
public function splice(startIndex:int, deleteCount:int):OrderedDictionaryRemove multiple items from the ordered dictionary.
ParametersstartIndex:int — The start index to delete from.
|
|
deleteCount:int — The number of items to delete.
|
OrderedDictionary |
| spliceByKeys | () | method |
public function spliceByKeys(... keys):OrderedDictionaryRemove objects by multiple keys.
Parameters... keys — The keys to delete.
|
OrderedDictionary |
| unshift | () | method |
public function unshift(name:*, value:*):intAdds one or more elements to the beginning of an ordered dictionary and returns the new length of the array.
Parametersname:* — The key name.
|
|
value:* — The value to store.
|
int |