| Package | com.gestureworks.cml.utils |
| Class | public class LinkedMap |
| Inheritance | LinkedMap flash.utils.Proxy |
| Subclasses | ChildList |
The structure is comprised of:
var lm:LinkedMap = new LinkedMap();
lm.append("s1", new Sprite());
lm.append("s2", new TouchSprite());
lm.reset();
trace(lm.next());
See also
| Property | Defined By | ||
|---|---|---|---|
| currentIndex : int
Returns and sets the current index
| LinkedMap | ||
| currentKey : * [read-only]
Returns the current key
| LinkedMap | ||
| currentValue : * [read-only]
Returns the current value
| LinkedMap | ||
| index : int
Returns and sets the current index
| LinkedMap | ||
| key : * [read-only]
Returns the current key
| LinkedMap | ||
| length : int [read-only]
Returns the length of the LinkedMap
| LinkedMap | ||
| value : * [read-only]
Returns the current value
| LinkedMap | ||
| Method | Defined By | ||
|---|---|---|---|
LinkedMap(weakKeys:Boolean = false)
Constructor
| LinkedMap | ||
append(key:*, value:*):void
Appends a value to the keys
| LinkedMap | ||
getIndex(index:int):*
Returns the value by index
| LinkedMap | ||
getKey(key:*):*
Returns the value by key
| LinkedMap | ||
getKeyArray():Array
Returns an array of keys. | LinkedMap | ||
getValueArray():Array
Returns an array of values
| LinkedMap | ||
hasKey(key:*):Boolean
Returns true if key exists
| LinkedMap | ||
hasNext():Boolean
Returns true if the iteration can return one more than the current index
| LinkedMap | ||
hasPrev():Boolean
Returns true if the iteration can return one less than the current index
| LinkedMap | ||
hasValue(value:*):Boolean
Returns true if value exists
| LinkedMap | ||
insert(index:int, key:*, value:*):void
Inserts a new key and value by index
| LinkedMap | ||
next():*
Returns the next value
| LinkedMap | ||
prepend(key:*, value:*):void
Prepends a key and value
| LinkedMap | ||
prev():*
Returns the previous index
| LinkedMap | ||
remove():void
Removes a key, value at current index
| LinkedMap | ||
removeByValue(value:*):void
Removes a key, value pair by value
| LinkedMap | ||
removeIndex(index:int):void
Removes a key, value pair by index
| LinkedMap | ||
removeKey(key:*):void
Removes a key, value pair by key
| LinkedMap | ||
replace(key:*, value:*):void
Replaces a key, value pair at the current index
| LinkedMap | ||
replaceKey(key:*, value:*):void
Replaces a value by key. | LinkedMap | ||
reset():void
Resets the current index to zero
| LinkedMap | ||
search(value:*):int
Searches by value and returns the first index found
| LinkedMap | ||
searchAll(value:*):Array
Searches by value and returns an array of indices found
| LinkedMap | ||
selectIndex(index:int):*
Returns a value by index and increments the current index
to the provided index parameter
| LinkedMap | ||
selectKey(key:*):*
Returns a value by key and increments the current index
to the provided index parameter
| LinkedMap | ||
toArray():Array
Returns a multidimensional array of key / value pairs
| LinkedMap | ||
| Method | Defined By | ||
|---|---|---|---|
deleteProperty(name:*):Boolean [override] | LinkedMap | ||
getProperty(name:*):* [override] | LinkedMap | ||
hasProperty(name:*):Boolean [override] | LinkedMap | ||
nextName(index:int):String [override] | LinkedMap | ||
nextNameIndex(index:int):int [override] | LinkedMap | ||
nextValue(index:int):* [override] | LinkedMap | ||
| currentIndex | property |
currentIndex:intReturns and sets the current index
public function get currentIndex():int public function set currentIndex(value:int):void| currentKey | property |
currentKey:* [read-only] Returns the current key
public function get currentKey():*| currentValue | property |
currentValue:* [read-only] Returns the current value
public function get currentValue():*| index | property |
index:intReturns and sets the current index
public function get index():int public function set index(value:int):void| key | property |
key:* [read-only] Returns the current key
public function get key():*| length | property |
length:int [read-only] Returns the length of the LinkedMap
public function get length():int| value | property |
value:* [read-only] Returns the current value
public function get value():*| LinkedMap | () | Constructor |
public function LinkedMap(weakKeys:Boolean = false)Constructor
ParametersweakKeys:Boolean (default = false) |
| append | () | method |
public function append(key:*, value:*):voidAppends a value to the keys
Parameters
key:* | |
value:* |
| deleteProperty | () | method |
override flash_proxy function deleteProperty(name:*):BooleanParameters
name:* |
Boolean |
| getIndex | () | method |
public function getIndex(index:int):*Returns the value by index
Parameters
index:int |
* — |
| getKey | () | method |
public function getKey(key:*):*Returns the value by key
Parameters
key:* |
* — |
| getKeyArray | () | method |
public function getKeyArray():ArrayReturns an array of keys.
ReturnsArray — |
| getProperty | () | method |
override flash_proxy function getProperty(name:*):*Parameters
name:* |
* |
| getValueArray | () | method |
public function getValueArray():ArrayReturns an array of values
ReturnsArray — |
| hasKey | () | method |
public function hasKey(key:*):BooleanReturns true if key exists
Parameters
key:* |
Boolean — |
| hasNext | () | method |
public function hasNext():BooleanReturns true if the iteration can return one more than the current index
ReturnsBoolean — |
| hasPrev | () | method |
public function hasPrev():BooleanReturns true if the iteration can return one less than the current index
ReturnsBoolean — |
| hasProperty | () | method |
override flash_proxy function hasProperty(name:*):BooleanParameters
name:* |
Boolean |
| hasValue | () | method |
public function hasValue(value:*):BooleanReturns true if value exists
Parameters
value:* |
Boolean — |
| insert | () | method |
public function insert(index:int, key:*, value:*):voidInserts a new key and value by index
Parameters
index:int | |
key:* | |
value:* |
| next | () | method |
public function next():*Returns the next value
Returns* — |
| nextName | () | method |
override flash_proxy function nextName(index:int):StringParameters
index:int |
String |
| nextNameIndex | () | method |
override flash_proxy function nextNameIndex(index:int):intParameters
index:int |
int |
| nextValue | () | method |
override flash_proxy function nextValue(index:int):*Parameters
index:int |
* |
| prepend | () | method |
public function prepend(key:*, value:*):voidPrepends a key and value
Parameters
key:* | |
value:* |
| prev | () | method |
public function prev():*Returns the previous index
Returns* — |
| remove | () | method |
public function remove():voidRemoves a key, value at current index
| removeByValue | () | method |
public function removeByValue(value:*):voidRemoves a key, value pair by value
Parameters
value:* |
| removeIndex | () | method |
public function removeIndex(index:int):voidRemoves a key, value pair by index
Parameters
index:int |
| removeKey | () | method |
public function removeKey(key:*):voidRemoves a key, value pair by key
Parameters
key:* |
| replace | () | method |
public function replace(key:*, value:*):voidReplaces a key, value pair at the current index
Parameters
key:* | |
value:* |
| replaceKey | () | method |
public function replaceKey(key:*, value:*):voidReplaces a value by key. If more than one key is found. The first instance will be replaced. To replace all keys, repeatedly call replaceKey until key is no longer found.
Parameters
key:* | |
value:* |
| reset | () | method |
public function reset():voidResets the current index to zero
| search | () | method |
public function search(value:*):intSearches by value and returns the first index found
Parameters
value:* |
int — |
| searchAll | () | method |
public function searchAll(value:*):ArraySearches by value and returns an array of indices found
Parameters
value:* |
Array — |
| selectIndex | () | method |
public function selectIndex(index:int):*Returns a value by index and increments the current index to the provided index parameter
Parameters
index:int |
* — |
| selectKey | () | method |
public function selectKey(key:*):*Returns a value by key and increments the current index to the provided index parameter
Parameters
key:* |
* — |
| toArray | () | method |
public function toArray():ArrayReturns a multidimensional array of key / value pairs
ReturnsArray — |