Packageorg.aswing
Classpublic class VectorListModel
InheritanceVectorListModel Inheritance AbstractListModel
ImplementsList, MutableListModel

The mutable list model vector implementation.



Protected Properties
 PropertyDefined by
  _elements : Array
VectorListModel
Public Methods
 MethodDefined by
  
VectorListModel(initalData:Array = null)
Create a VectorListModel instance.
VectorListModel
 Inherited
AbstractListModel
  
append(obj:*, index:int = -1):void
VectorListModel
  
appendAll(arr:Array, index:int = -1):void
Append all the elements of a array(arr) to the specified position of the vector.
VectorListModel
  
appendList(list:List, index:int = -1):void
VectorListModel
  
clear():void
VectorListModel
  
contains(obj:*):Boolean
VectorListModel
  
first():*
VectorListModel
  
get(i:int):*
VectorListModel
  
getElementAt(i:int):*
implemented ListMode
VectorListModel
  
getSize():int
Implemented ListMode
VectorListModel
  
indexOf(obj:*):int
VectorListModel
  
insertElementAt(item:*, index:int):void
VectorListModel
  
isEmpty():Boolean
VectorListModel
  
last():*
VectorListModel
  
pop():*
VectorListModel
  
remove(obj:*):*
VectorListModel
  
removeAt(index:int):*
VectorListModel
  
removeElementAt(index:int):void
VectorListModel
 Inherited
AbstractListModel
  
removeRange(fromIndex:int, toIndex:int):Array
Removes from this List all of the elements whose index is between fromIndex, and toIndex(both inclusive).
VectorListModel
  
replaceAt(index:int, obj:*):*
VectorListModel
  
shift():*
VectorListModel
  
size():int
VectorListModel
  
sort(compare:Object, options:int):Array
VectorListModel
  
sortOn(key:Object, options:int):Array
VectorListModel
  
subArray(startIndex:int, length:int):Array
Returns a array that contains elements start with startIndex and has length elements.
VectorListModel
  
toArray():Array
VectorListModel
  
toString():String
VectorListModel
  
valueChanged(obj:*):void
Notice the listeners the specified obj's value changed.
VectorListModel
  
valueChangedAt(index:int):void
Notice the listeners the specified obj's value changed.
VectorListModel
  
valueChangedRange(from:int, to:int):void
Notice the listeners the specified range values changed.
VectorListModel
Protected Methods
 MethodDefined by
 Inherited
fireContentsChanged(target:Object, index0:int, index1:int, removedItems:Array):void
AbstractListModel
 Inherited
fireIntervalAdded(target:Object, index0:int, index1:int):void
AbstractListModel
 Inherited
fireIntervalRemoved(target:Object, index0:int, index1:int, removedItems:Array):void
AbstractListModel
Public Constants
 ConstantDefined by
  CASEINSENSITIVE : int = 1
[static]
VectorListModel
  DESCENDING : int = 2
[static]
VectorListModel
  NUMERIC : int = 16
[static]
VectorListModel
  RETURNINDEXEDARRAY : int = 8
[static]
VectorListModel
  UNIQUESORT : int = 4
[static]
VectorListModel
Property detail
_elementsproperty
protected var _elements:Array
Constructor detail
VectorListModel()constructor
public function VectorListModel(initalData:Array = null)

Create a VectorListModel instance.

Parameters
initalData:Array (default = null) — (optional)the to be copid to the model.
Method detail
append()method
public function append(obj:*, index:int = -1):voidParameters
obj:*
 
index:int (default = -1)
appendAll()method 
public function appendAll(arr:Array, index:int = -1):void

Append all the elements of a array(arr) to the specified position of the vector.

Parameters
arr:Array — the elements array
 
index:int (default = -1) — the position to be append, default is -1 means the end of the vector.
appendList()method 
public function appendList(list:List, index:int = -1):voidParameters
list:List
 
index:int (default = -1)
clear()method 
public function clear():void
contains()method 
public function contains(obj:*):BooleanParameters
obj:*

Returns
Boolean
first()method 
public function first():*

Returns
*
get()method 
public function get(i:int):*Parameters
i:int

Returns
*
getElementAt()method 
public function getElementAt(i:int):*

implemented ListMode

Parameters
i:int

Returns
*
getSize()method 
public function getSize():int

Implemented ListMode

Returns
int
indexOf()method 
public function indexOf(obj:*):intParameters
obj:*

Returns
int
insertElementAt()method 
public function insertElementAt(item:*, index:int):void

Parameters
item:*
 
index:int

See also

isEmpty()method 
public function isEmpty():Boolean

Returns
Boolean
last()method 
public function last():*

Returns
*
pop()method 
public function pop():*

Returns
*
remove()method 
public function remove(obj:*):*Parameters
obj:*

Returns
*
removeAt()method 
public function removeAt(index:int):*Parameters
index:int

Returns
*
removeElementAt()method 
public function removeElementAt(index:int):void

Parameters
index:int

See also

removeRange()method 
public function removeRange(fromIndex:int, toIndex:int):Array

Removes from this List all of the elements whose index is between fromIndex, and toIndex(both inclusive). Shifts any succeeding elements to the left (reduces their index). This call shortens the ArrayList by (toIndex - fromIndex) elements. (If toIndex==fromIndex, this operation has no effect.)

Parameters
fromIndex:int
 
toIndex:int

Returns
Array — the elements were removed from the vector
replaceAt()method 
public function replaceAt(index:int, obj:*):*Parameters
index:int
 
obj:*

Returns
*
shift()method 
public function shift():*

Returns
*
size()method 
public function size():int

Returns
int
sort()method 
public function sort(compare:Object, options:int):ArrayParameters
compare:Object
 
options:int

Returns
Array
sortOn()method 
public function sortOn(key:Object, options:int):ArrayParameters
key:Object
 
options:int

Returns
Array
subArray()method 
public function subArray(startIndex:int, length:int):Array

Returns a array that contains elements start with startIndex and has length elements.

Parameters
startIndex:int — the element started index(include)
 
length:int — length of the elements, if there is not enough elements left, return the elements ended to the end of the vector.

Returns
Array
toArray()method 
public function toArray():Array

Returns
Array
toString()method 
public function toString():String

Returns
String
valueChanged()method 
public function valueChanged(obj:*):void

Notice the listeners the specified obj's value changed.

Parameters
obj:*
valueChangedAt()method 
public function valueChangedAt(index:int):void

Notice the listeners the specified obj's value changed.

Parameters
index:int
valueChangedRange()method 
public function valueChangedRange(from:int, to:int):void

Notice the listeners the specified range values changed. [from, to](include "from" and "to").

Parameters
from:int
 
to:int
Constant detail
CASEINSENSITIVEconstant
public static const CASEINSENSITIVE:int = 1
DESCENDINGconstant 
public static const DESCENDING:int = 2
NUMERICconstant 
public static const NUMERIC:int = 16
RETURNINDEXEDARRAYconstant 
public static const RETURNINDEXEDARRAY:int = 8
UNIQUESORTconstant 
public static const UNIQUESORT:int = 4