Package | com.gestureworks.cml.utils |
Class | public class List |
Inheritance | List ![]() |
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:int
Returns 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:int
Returns 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:*):void
Appends a value to the list
Parameters
value:* |
deleteProperty | () | method |
override flash_proxy function deleteProperty(name:*):Boolean
Parameters
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):Boolean
Returns true if a value exists for the index
Parameters
index:int |
Boolean — |
hasNext | () | method |
public function hasNext():Boolean
Returns true if the iteration can return one more than the current index
ReturnsBoolean — |
hasPrev | () | method |
public function hasPrev():Boolean
Returns true if the iteration can return one less than the current index
ReturnsBoolean — |
hasProperty | () | method |
override flash_proxy function hasProperty(name:*):Boolean
Parameters
name:* |
Boolean |
insert | () | method |
public function insert(index:int, value:*):void
Inserts 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):String
Parameters
index:int |
String |
nextNameIndex | () | method |
override flash_proxy function nextNameIndex(index:int):int
Parameters
index:int |
int |
nextValue | () | method |
override flash_proxy function nextValue(index:int):*
Parameters
index:int |
* |
prepend | () | method |
public function prepend(value:*):void
Prepends a value to the list
Parameters
value:* |
prev | () | method |
public function prev():*
Returns the previous index
Returns* — |
remove | () | method |
public function remove(index:int):void
Removes a value by index
Parameters
index:int |
replace | () | method |
public function replace(index:int, value:String):void
Replaces value by index
Parameters
index:int | |
value:String |
reset | () | method |
public function reset():void
Resets the current index to zero
search | () | method |
public function search(value:*):int
Searches by value and returns the first index that matches the value
Parameters
value:* |
int — |
searchAll | () | method |
public function searchAll(value:*):Array
Searches 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():Array
Returns the previous index
ReturnsArray — |