Packagesystem.data
Interfacepublic interface List extends Collection, Cloneable, Iterable, Serializable
Implementors ArrayList, LinkedList

An ordered collection (also known as a sequence). The user of this interface has precise control over where in the list each element is inserted. The user can access elements by their integer index (position in the list), and search for elements in the list.



Public Methods
 MethodDefined By
 Inherited
add(o:*):Boolean
Ensures that this collection contains the specified element (optional operation).
Collection
  
addAll(c:Collection):Boolean
Appends all of the elements in the specified collection to the end of this Collection, in the order that they are returned by the specified collection's iterator (optional operation).
List
  
addAt(index:uint, o:*):void
Inserts the specified element at the specified position in this list (optional operation).
List
 Inherited
clear():void
Removes all of the elements from this collection (optional operation).
Collection
 Inherited
clone():*
Creates and returns a shallow copy of the object.
Cloneable
 Inherited
contains(o:*):Boolean
Returns true if this collection contains the specified element.
Collection
  
Returns true if this list contains all of the elements of the specified collection.
List
 Inherited
get(key:*):*
Returns the element from this collection at the passed index.
Collection
 Inherited
indexOf(o:*, fromIndex:uint = 0):int
Returns the position of the passed object in the collection.
Collection
 Inherited
isEmpty():Boolean
Returns true if this collection contains no elements.
Collection
 Inherited
Returns the iterator reference of the object.
Iterable
  
lastIndexOf(o:*, fromIndex:int = 0x7FFFFFFF):int
Returns the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element.
List
 Inherited
remove(o:*):*
Removes a single instance of the specified element from this collection, if it is present (optional operation).
Collection
  
removeAt(id:uint, len:int = 1):*
Removes from this list all the elements that are contained between the specific id position and the end of this list (optional operation).
List
  
removeRange(fromIndex:uint, toIndex:uint):*
Removes from this List all of the elements whose index is between fromIndex, inclusive and toIndex, exclusive.
List
  
Retains only the elements in this list that are contained in the specified collection (optional operation).
List
  
set(index:uint, o:*):*
Replaces the element at the specified position in this list with the specified element (optional operation).
List
 Inherited
size():uint
Retrieves the number of elements in this collection.
Collection
  
subList(fromIndex:uint, toIndex:uint):List
Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive.
List
 Inherited
toArray():Array
Returns an array containing all of the elements in this collection.
Collection
 Inherited
toSource(indent:int = 0):String
Returns the source code string representation of the object.
Serializable
Method Detail
addAll()method
public function addAll(c:Collection):Boolean

Appends all of the elements in the specified collection to the end of this Collection, in the order that they are returned by the specified collection's iterator (optional operation).

Parameters

c:Collection

Returns
Booleantrue if this list changed as a result of the call.
addAt()method 
public function addAt(index:uint, o:*):void

Inserts the specified element at the specified position in this list (optional operation).

Parameters

index:uint
 
o:*

containsAll()method 
public function containsAll(c:Collection):Boolean

Returns true if this list contains all of the elements of the specified collection.

Parameters

c:Collection

Returns
Booleantrue if this list contains all of the elements of the specified collection.
lastIndexOf()method 
public function lastIndexOf(o:*, fromIndex:int = 0x7FFFFFFF):int

Returns the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element.

Parameters

o:*
 
fromIndex:int (default = 0x7FFFFFFF)

Returns
int — the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element.
removeAt()method 
public function removeAt(id:uint, len:int = 1):*

Removes from this list all the elements that are contained between the specific id position and the end of this list (optional operation).

Parameters

id:uint — The index of the element or the first element to remove.
 
len:int (default = 1) — The number of elements to remove (default 1).

Returns
*
removeRange()method 
public function removeRange(fromIndex:uint, toIndex:uint):*

Removes from this List all of the elements whose index is between fromIndex, inclusive and toIndex, exclusive.

Shifts any succeeding elements to the left (reduces their index).

This call shortens the list by (toIndex - fromIndex) elements. (If toIndex==fromIndex, this operation has no effect.)

Parameters

fromIndex:uint — The from index (inclusive) to remove elements in the list.
 
toIndex:uint — The to index (exclusive) to remove elements in the list.

Returns
*
retainAll()method 
public function retainAll(c:Collection):Boolean

Retains only the elements in this list that are contained in the specified collection (optional operation).

Parameters

c:Collection

Returns
Boolean
set()method 
public function set(index:uint, o:*):*

Replaces the element at the specified position in this list with the specified element (optional operation).

Parameters

index:uint — index of element to replace.
 
o:* — element to be stored at the specified position.

Returns
* — the element previously at the specified position.
subList()method 
public function subList(fromIndex:uint, toIndex:uint):List

Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive.

Parameters

fromIndex:uint
 
toIndex:uint

Returns
List — a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive.