| Package | com.gestureworks.cml.utils |
| Class | public class List |
| Inheritance | List flash.utils.Proxy |
| Implements | IList, IListIterator |
The structure is comprised of:
var l:List = new List();
l.append(new Sprite());
l.append(new TouchSprite());
l.reset();
trace(l.next());
See also
| Property | Defined By | ||
|---|---|---|---|
| currentIndex : int
Returns and sets the current index
| List | ||
| currentValue : * [read-only]
Returns the current value
| List | ||
| index : int
Returns and sets the current index
| List | ||
| length : int [read-only]
Returns the length of list
| List | ||
| value : *
Returns the current value
| List | ||
| Method | Defined By | ||
|---|---|---|---|
List()
Constructor
| List | ||
append(value:*):void
Appends a value to the list
| List | ||
getIndex(index:int):*
Returns the value by index
| List | ||
hasIndex(index:int):Boolean
Returns true if a value exists for the index
| List | ||
hasNext():Boolean
Returns true if the iteration can return one more than the current index
| List | ||
hasPrev():Boolean
Returns true if the iteration can return one less than the current index
| List | ||
insert(index:int, value:*):void
Inserts a new value by index
| List | ||
next():*
Returns the next value
| List | ||
prepend(value:*):void
Prepends a value to the list
| List | ||
prev():*
Returns the previous index
| List | ||
remove(index:int):void
Removes a value by index
| List | ||
replace(index:int, value:String):void
Replaces value by index
| List | ||
reset():void
Resets the current index to zero
| List | ||
search(value:*):int
Searches by value and returns the first index that matches the value
| List | ||
searchAll(value:*):Array
Searches by value and returns all found indices in an ordered array
| List | ||
selectIndex(index:int):*
Returns a value by index and increments the current index
to the provided index parameter
| List | ||
toArray():Array
Returns the previous index
| List | ||
| Method | Defined By | ||
|---|---|---|---|
deleteProperty(name:*):Boolean [override] | List | ||
getProperty(name:*):* [override] | List | ||
hasProperty(name:*):Boolean [override] | List | ||
nextName(index:int):String [override] | List | ||
nextNameIndex(index:int):int [override] | List | ||
nextValue(index:int):* [override] | List | ||
| currentIndex | property |
currentIndex:intReturns and sets the current index
public function get currentIndex():int public function set currentIndex(value:int):void| 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| length | property |
length:int [read-only] Returns the length of list
public function get length():int| value | property |
value:*Returns the current value
public function get value():* public function set value(value:any):void| List | () | Constructor |
public function List()Constructor
| append | () | method |
public function append(value:*):voidAppends a value to the list
Parameters
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 |
* — |
| getProperty | () | method |
override flash_proxy function getProperty(name:*):*Parameters
name:* |
* |
| hasIndex | () | method |
public function hasIndex(index:int):BooleanReturns true if a value exists for the index
Parameters
index:int |
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 |
| insert | () | method |
public function insert(index:int, value:*):voidInserts a new value by index
Parameters
index:int | |
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(value:*):voidPrepends a value to the list
Parameters
value:* |
| prev | () | method |
public function prev():*Returns the previous index
Returns* — |
| remove | () | method |
public function remove(index:int):voidRemoves a value by index
Parameters
index:int |
| replace | () | method |
public function replace(index:int, value:String):voidReplaces value by index
Parameters
index:int | |
value:String |
| 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 that matches the value
Parameters
value:* |
int — |
| searchAll | () | method |
public function searchAll(value:*):ArraySearches by value and returns all found indices in an ordered array
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 |
* — |
| toArray | () | method |
public function toArray():ArrayReturns the previous index
ReturnsArray — |